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:
Alpha++;
Break;
Case 4:
Case 6:
Alpha = alpha + 3;
Case 8:
Alpha = alpha + 4;
Break;
Default:
Alpha = alpha + 5;
}
Cout << alpha << endl;
A) 13
B) 14
C) 17
D) 22
Correct Answer:
Verified
Q24: The _ of relational and logical operators
Q30: Suppose found = true and num =
Q33: What is the output of the
Q34: The symbol > is a(n)_ operator.
Q35: You can disable assert statements by using
Q36: What is the output of the following
Q38: A _ operator allows you to make
Q39: In C++,the logical operator AND is represented
Q39: The value of the expression 7 +
Q40: For a program to use the assert
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents