Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What will be the result of the following program?
main()
{
char p[]="String";
int x=0;

if(p=="String")
{
printf("Pass 1");
if(p[sizeof(p)-2]=='g')
printf("Pass 2");
else
printf("Fail 2");
}
else
{
printf("Fail 1");
if(p[sizeof(p)-2]=='g')
printf("Pass 2");
else
printf("Fail 2");
}
}

a) Pass 1, Pass 2
b) Fail 1, Fail 2
c) Pass 1, Fail 2
d) Fail 1, Pass 2
e) syntax error during compilation

Answer Posted / rakhi

b) Fail 1 Fail 2

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we declare a function inside a function in c?

1009


Write a program to reverse a given number in c language?

1077


What is #include cctype?

1088


What are qualifiers and modifiers c?

961


How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

992


How is a pointer variable declared?

1041


What happens if a header file is included twice?

1001


Why isn't it being handled properly?

1029


what is the height of tree if leaf node is at level 3. please explain

2112


What are enumerated types?

1136


Why doesnt that code work?

1106


write a c program in such a way that if we enter the today date the output should be next day's date.

2159


What is the best organizational structure?

1080


In c programming, explain how do you insert quote characters (? And ?) Into the output screen?

1219


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

15958