Vương Tuấn Khải
New member
What will be the output of the following C code?
A. Compile time error
B. 1
C. 2
D. Undefined behaviour
Code:
#include <stdio.h>
int main()
{
int a = 2;
int b = 0;
int y = (b == 0) ? a :(a > b) ? (b = 1): a;
printf("%d\n", y);
}
B. 1
C. 2
D. Undefined behaviour