Solved

What Is the Output of the Following Code Fragment If \quad

Question 10

Multiple Choice

What is the output of the following code fragment if the input value is 4? int num;
Int alpha = 10;
Cin >> num;
Switch (num)
{
Case 3:
\quad Alpha++;
\quad Break;
Case 4:
Case 6:
\quad Alpha = alpha + 3;
Case 8:
\quad Alpha = alpha + 4;
\quad Break;
Default:
\quad Alpha = alpha + 5;
}
Cout << alpha << endl;


A) 13
B) 14
C) 17
D) 22

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions