What is the output of the following segment of code if the value 4 is input by the user?
```
int num;
int total = 0;
cout << "Enter a number from 1 to 10: ";
cin >> num;
switch (num)
{
case 1:
case 2: total = 5;
case 3: total = 10;
case 4: total = total + 3;
case 8: total = total + 6;
default: total = total + 4;
}
cout << total << endl;
```
a. 0
b. 3
c. 13
d. 23
e. None of these
c. 13
You might also like to view...
The __________ provides a virtual memory capability that allocates page frames in main memory to processes and also allocates page frames to disk block buffers.
Fill in the blank(s) with the appropriate word(s).
________ functions, for example AND and NOT, test for specific conditions
Fill in the blank(s) with correct word
What is the minimum size of an Ethernet frame?
A. 64 bytes B. 256 bytes C. 1024 bytes D. 1500 bytes
Active Directory Federation Services enables companies and business partners to collaborate with each other without the need to establish trust relationships and without the need for users in these companies to remember multiple usernames and passwords
Indicate whether the statement is true or false