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

What will be the output of the following C code?
Code:
    #include <stdio.h>
    int main()
    {
        int x = 1;
        int y =  x == 1 ? getchar(): 2;
        printf("%d\n", y);
    }
A. Compile time error
B. Whatever character getchar function returns
C. Ascii value of character getchar function returns
D. 2
 

Tìm kiếm

Back
Top