Programming MCQS - QUESTION DETAILS

What is the output of printf("%d", 1 == 1 ? 10 : 20);?
A. 10
B. 20
C. 1
D. 0

The ternary operator evaluates to 10 when the condition is true.

Similar Questions

What is the purpose of the 'instanceof' operator in Java?






How do you define a multi-line macro in C?






What is the purpose of the 'finally' block in Java?






What is the purpose of the 'getch' function in C?






What is the output of printf("%c", 65);?






What is the output of printf("%c", 'a' - 32);?






What is the output of System.out.println("Hello" + 1 + 2);?






How do you declare a function pointer in C?






Which Java keyword is used to implement multiple interfaces in a class?






Which of the following is not a bitwise operator in C?