Multiple choice

void main() { int a=5,b=4,c=10; *((a>b) ? &a : &b) = (a+b>c); printf(%d %d,a,b); }

  1. Syntax error

  2. Fatal error

  3. 0 4

  4. System hangs

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The ternary operator (a>b) evaluates to 1 (true) since 5>4, so &a is selected. The assignment *((a>b) ? &a : &b) becomes *&a, which assigns to a. The expression (a+b>c) is 5+4>10 = 9>10 = 0 (false in C). So a becomes 0, b remains 4. Hence output is '0 4'.