Vidyalelo
C Programming · Q35

Operators and Expressions

Programming · C Programming · question 35

Q35

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

A.
10
B.
14
C.
0
Answer
D.
1
E.
None of these

Answer: Option C

Solution

Answer: Option C
Solution:

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