Vidyalelo
C Programming · Q268

C Fundamentals

Programming · C Programming · question 268

Q268

What will be the output of the following C code? #include int main() int x = 1; int y = x == 1 ? getchar(): 2; printf("%d ", y);

A.
Compile time error
B.
Whatever character getchar function returns
C.
Ascii value of character getchar function returns
Answer
D.
2

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board