Question PRG-C-0079
HardWhat is the output of this program?
#include <stdio.h>
int main() {
int a = 10;
int b = (a > 5) ? (a < 15 ? a * 2 : a) : 0;
int c = a > 5 ? 1 : a > 2 ? 2 : 3;
printf("%d %d", b, c);
return 0;
}
- A.
20 1
- B.
10 1
- C.
Sign up free to see the answer and a step-by-step explanation.