GkSeries.com

Q.

Find the error in the following program:

	main()
	{
		int m;
		char g;
		switch(m)
		{
			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]

DOWNLOAD CURRENT AFFAIRS PDF FROM APP

Please share this page

Click Here to Read more questions

Teacher Eligibility Test