ExamVeda
Login
Home
Operators and Expressions
?

Determine output:
void main()
{ 
      int i=10; 
      i = !i>14; 
      printf("i=%d", i); 
}

Answer & Solution
Correct Answer: Option C

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).

Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
Prabhat Upadhyay
Prabhat Upadhyay 9 years ago
First we solve i>14 and then !