MCQOPTIONS
Saved Bookmarks
| 1. |
What will be the output of the following C code? (Assuming that we have entered the value 2 in the standard input).#include <stdio.h> int main() { int p; printf("Enter a value between 1 to 2:"); scanf("%d", &p); switch (p) { case 1: printf("hey... n"); break; printf("Hello..."); default: printf("How are U? n"); } } |
| A. | Hey... |
| B. | Hello... |
| C. | How are U? |
| D. | All of above |
| E. | None of these |
| Answer» D. All of above | |