Online GK Series

This site is dedicated to the aspirants of competitive exams SSC, UPSC, Railways, Postal Assistants, Bank, GATE and NET


Find the error in the following program:

		int m;
		char g;
			case 3: grade="P";break;
			case 2: grade="Q";break;
			case 1: grade="R";break;
			default: grade="S";break;

What will be the output of the program?

A Undefined symbol "grade"
B switch statement cannot have more than three labels
C case label cannot be numbers
D none of these
Answer & Explanation
Option: [A]

mcq on c programming conditional statements 01

Your Valuable Comments Please...

Computer Science Books