Q250
What will be the output of the following C code? #include int main() int n; scanf("%d", &n); ungetc(n, stdin); scanf("%d", &n); printf("%d ", n); return 0;
A.
Compile time error
B.
Whatever is typed by the user first time
AnswerC.
Whatever is typed by the user second time
D.
Undefined behaviour
Answer: Option B
Solution
Answer: Option B
No explanation is given for this question Let's Discuss on Board