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 / guest

Fail 1,Fail 2

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages and disadvantages of pointers?

1073


What is s or c?

1066


Why do we use int main?

1103


What is structure padding in c?

1135


What is difference between stdio h and conio h?

1382


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

1074


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

1128


Do you have any idea about the use of "auto" keyword?

1085


how to introdu5ce my self in serco

2007


please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................

2021


List some basic data types in c?

1029


What are register variables in c?

1016


hi send me sample aptitude papers of cts?

2166


Write a program to identify if a given binary tree is balanced or not.

1164


swap 2 numbers without using third variable?

1135