Question: C Programming 1. What does the following code print out? int flag = 2; switch (flag){ case 1: printf(case1 ); case 2: printf(case2 ); default:
C Programming
1. What does the following code print out?
int flag = 2;
switch (flag){
case 1: printf(case1 );
case 2: printf(case2 );
default: printf(default );
}
2. what is the output of the following code?
int beta = 5;
do{
switch (beta){
case 1 : printf(N); break;
case 2 :
case 4 : printf(E); break;
case 5 : printf(K);
}
beta--;
}
while (beta > 1);
printf(P);
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
