Current Affairs Monthly Magazine -Subscribe Now!
900 GEOGRAPHY MCQS | EBook
1000 BIOLOGY MCQS AND ANSWERS | EBook
1000 POLITICAL SCIENCE MCQS | EBook
1000 ECONOMICS MCQS FOR EXAMS | EBook
Mughal Empire MCQs | EBook
ECONOMIC GEOGRAPHY MCQs | EBook
350 MCQs ON INDIAN CONSTITUTION | EBook
GENERAL AWARENESS COMBO (6 EBOOKS)

Question

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]

mcq on c programming conditional statements 01

Month-wise Current Affairs 2022

Category-wise Current Affairs

Jobs by Qualification

Free Mock Test