MCQOPTIONS
Saved Bookmarks
| 1. |
What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input).#include <stdio.h> void main() { char *n; printf("Enter a value between 1 to 3:"); scanf("%s", n); switch (n) { case "1": printf("Hey"); break; case "2": printf("Hello"); break; } } |
| A. | Hey |
| B. | Hellow |
| C. | Compilation Error |
| D. | Runtime Error |
| E. | None of these |
| Answer» D. Runtime Error | |