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...

main()
{
int i=0;
while(+(+i--)!=0)
i-=i++;
printf("%d",i);
}

Answer Posted / rayan

ans is -1.

Initially i == 0, when it enters into while loop

while(+(+i--)!0)

in 1st iteration i value ll be 0 only due to post decrement
operator.

in second iteration as i gets its post decremented value n
becomes -1 & -1 ~= 0 condition gets true & while loop breaks.

here + operator in the loop is doing ntg.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the format %10.2 mean when included in a printf statement?

1659


Mention four important string handling functions in c languages .

1117


Are comments included during the compilation stage and placed in the EXE file as well?

1088


For what purpose null pointer used?

1086


What is the difference between #include

and #include “header file”?

1039


What is the difference between fread buffer() and fwrite buffer()?

1188


What is the purpose of main( ) in c language?

1142


what are the advantages of a macro over a function?

1147


How do you sort filenames in a directory?

1185


What is sizeof return in c?

1041


What is console in c language?

1101


What are the modifiers available in c programming language?

1227


"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above

1029


What are the different properties of variable number of arguments?

1166


What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }

2509