Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 107

  Shared By: Adah Miller    Date: Jan 24    Category: C Programming    Views: 66

Answer:

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


Answer:
1


Explanation:
Note the semicolon after the while statement. When the value of i becomes 0 it comes out of while loop. Due to post-increment on i the value of i while printing is 1.

Share: 
 

Didn't find what you were looking for? Find more on C programming practical question 107 Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: