Discussion Forum : Operators And Expressions
Question - Determine output:
void main()
{
int i=10;
i = !i>14;
printf("i=%d", i);
}
Options:
A .  10
B .  14
C .  0
D .  1
E .  None of these
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).

Was this answer helpful ?
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *