What will be the output of the following C code? [code] #include <stdio.h> int main() { int a = 2; int b =

What will be the output of the following C code?
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);
    }
A. Compile time error
B. 1
C. 2
D. Undefined behaviour
 

Tìm kiếm

Back
Top