Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 137

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

Answer:

main()
{
int i=5,j=10;
i=i&=j&&10;
printf("%d %d",i,j);
}


Answer:
1 10


Explanation:
The expression can be written as i=(i&=(j&&10)); The inner expression (j&&10) evaluates to 1 because j==10. i is 5. i = 5&1 is 1. Hence the result.

Share: 
 

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


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


Tagged: