Question
What is the output of this C code?
int main()
{
int x = 1;
int y = x == 1 ? getchar(): 2;
printf("%d\n", y);
}
int main()
{
int x = 1;
int y = x == 1 ? getchar(): 2;
printf("%d\n", y);
}
Answer: Option C
Was this answer helpful ?
None.
Was this answer helpful ?
Submit Solution