switch(choice){ case 'R' : printf("RED"); case 'W' : printf("WHITE"); case 'B' : printf("BLUE"); default : printf("ERROR");break;} Correct Answer RED WHITE BLUE ERROR <p>As the first option is matching, the cases are evaluated till the break statement is encountered or end of switch statement is encountered.</p>"/> switch(choice){ case 'R' : printf("RED"); case 'W' : printf("WHITE"); case 'B' : printf("BLUE"); default : printf("ERROR");break;}"> switch(choice){ case 'R' : printf("RED"); case 'W' : printf("WHITE"); case 'B' : printf("BLUE"); default : printf("ERROR");break;} "/> switch(choice){ case 'R' : printf("RED"); case 'W' : printf("WHITE"); case 'B' : printf("BLUE"); default : printf("ERROR");break;} Correct Answer RED WHITE BLUE ERROR <p>As the first option is matching, the cases are evaluated till the break statement is encountered or end of switch statement is encountered.</p>"/> switch(choice){ case 'R' : printf("RED"); case 'W' : printf("WHITE"); case 'B' : printf("BLUE"); default : printf("ERROR");break;}">

What will be the following code's output if choice = 'R'?

switch(choice){ case 'R' : printf("RED"); case 'W' : printf("WHITE"); case 'B' : printf("BLUE"); default : printf("ERROR");break;}
Correct Answer RED WHITE BLUE ERROR

As the first option is matching, the cases are evaluated till the break statement is encountered or end of switch statement is encountered.

শেয়ার করুন বন্ধুর সাথে

বিসিএস, ব্যাংক, প্রাইমারি সহ সরকারি বেসরকারি চাকুরীর পরীক্ষার প্রস্তুতির জন্য ডাউনলোড করুন Bissoy অ্যাপ

Related MCQ's

If both codes are 0000, (bitwise OR of the codes yields 0000) line lies __________________ the window.

Fruitfly mitochondrial codes AGA and AGG codes for _____________

IA allele codes for the _________________ while IB codes for _________________