MCQs > IT & Programming > C Programming > Output as a result of the following code snippet? main() { int i=5; char option = 5; switch(option) { case '5': printf('case : 1 \n'); break; case i: printf('case : 2 \n'); break; default: printf('case : 3 \n'); break; } return 0; }

C Programming MCQs

What would be printed on the standard output as a result of the
following code snippet?
main()
{
int i=5;
char option = 5;
switch(option)

{
case '5':
printf("case : 1 \n");
break;
case i:
printf("case : 2 \n");
break;
default:
printf("case : 3 \n");
break;
}
return 0;
}

Answer

Correct Answer: Result in compilation error

Explanation:

Note: This Question is unanswered, help us to find answer for this one

C Programming Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

C Programming Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it