Poll Results
No votes. Be the first one to vote.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The statement `printf(“%d”, 10 ? 0 ? 5 : 1 : 12);` will print `12`.
Here’s the breakdown:
– The conditional operator (`? :`) evaluates `10`, which is true (non-zero).
– Since `10` is true, it evaluates `0 ? 5 : 1`.
– Now, `0` is false, so this part evaluates to `1`.
– Therefore, the final value is obtained from the outer conditional as `12`.
The result printed is `12`.