Question PRG-C-0010
MediumWhat is the output of this program?
#include <stdio.h>
int main(void) {
int x = 2;
switch (x) {
case 1: printf("One ");
case 2: printf("Two ");
case 3: printf("Three ");
default: printf("Default");
}
return 0;
}
- A.
Two Three Default
- B.
Default
- C.
Sign up free to see the answer and a step-by-step explanation.