Sports GK Questions and Answers 2024 (Latest Updated)

Awards & Honours GK Questions 2024 (Latest Updated)

Question

Consider the following code snippet

marks = 80;
switch (marks)
{
	case 60:
	grade = ‘C’;
	break;
	case 70: 
	grade = ‘B’;
	break;
	case 80:
	grade = ‘A’;
	break;
	default:
	grade = ‘E’;
}

What is the value of ‘grade’ after the switch statement is executed?

A A
B B
C C
D E
Answer & Explanation
Option: [A]
Advertisement
Article and Schedule Quiz Start Test!
DOWNLOAD CURRENT AFFAIRS PDF FROM APP
Assam Direct Recruitment Test Series

Computer Science Topics