What will be the output of the following program on GCC?

		
					

Loading

โœช Choose the correct option.

What will be the output of the following program on GCC?

#include 
int main(){
int i;
printf("Enter a number");
scanf("%d",&i); // 1
switch(i){
case 1:
printf("Do ");
case 2:
printf("Re ");
case 3:
printf("Me ");
case default:
printf("Fa So La Ti Do ");
}
return 0;
}

A. Compiler Error
B. Do
Re
Me
C. Do
Re
Me
Fa So La Ti Do
D. Do
Fa So La Ti Do

Leave a Comment