MCQOPTIONS
Saved Bookmarks
| 1. |
What will be the output of the program? #include int main() { int i; char c; for(i=1; i<=5; i++) { scanf("%c", &c); /* given input is 'a' */ printf("%c", c); ungetc(c, stdin); } return 0; } |
| A. | aaaa |
| B. | aaaaa |
| C. | Garbage value |
| D. | Error in ungetc statement |
| Answer» C. Garbage value | |