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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!