-
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int num;
scanf("%d", &num);
ungetc(num, stdin);
scanf("%d", &num);
printf("%d\n", num);
return 0;
}
-
- Whatever is typed by the user first time
- Undefined behaviour
- Compilation Error
- Whatever is typed by the user second time
- None of these
Correct Option: B
Undefined behaviour