Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 127

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

Answer:

main()
{
int i=5;
printf(“%d”,i=++i ==6);
}


Answer:
1


Explanation:
The expression can be treated as i = (++i==6), because == is of higher precedence than = operator. In the inner expression, ++i is equal to 6 yielding true(1). Hence the result.

Share: 
 

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


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


Tagged: