A

Admin • 833K Points
Coach

Q. Determine Output

Code:
void main()
{
int i=10;
i=!i>14;
printf("i=%d", i);
}
  • (A) 10
  • (B) 14
  • (C) 0
  • (D) 1
  • Correct Answer - Option(C)
  • Views: 15
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

In the expression !i>14 , NOT (!) operator has more precedence than ">" symbol. ! is a unary logical operator. !i (!10) is 0 (not of true is false). 0>14 is false (zero).

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.