What is the output of the below fragment of C code, if i = 3?

Loading

โœช Choose the correct option.

What is the output of the below fragment of C code, if i = 3?


if (i >1)c = 2;

else c = 3;

switch (c) {

case 2: printf("CAUTION");

break;

case 3: printf("GOOD BYE");

break;

default : printf("TERROR");

}

A. CAUTION
B. GOOD BYE
C. ERROR
D. Default

Leave a Comment