Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 38

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

Answer:

main()
{
int i=0;

for(;i++;printf("%d",i)) ;
printf("%d",i);
}


Answer:
1


Explanation:
before entering into the for loop the checking condition is "evaluated". Here it evaluates to 0 (false) and comes out of the loop, and i is incremented (note the semicolon after the for loop).


Share: 
 

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


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


Tagged: