What is the output of the following code:

int p = 5 + 7/2;
switch (p)
{
case 5: cout << ‘a’; break;
case 7: cout << ‘b’; break;
case 8: cout << ‘c’; break;
default: cout << “None of the above”;
}

a) a
b) b
c) c
d) None of the above


c) c

Computer Science & Information Technology

You might also like to view...

Data stored in arrays is permanent data.

What will be an ideal response?

Computer Science & Information Technology

In a pseudocode class definition, if a method returns a value, the method header starts with the method name

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The DB function used to calculate the declining balance depreciation has the following syntax: _______.

A. =DB(salvage, life, period [month]) B. =DB(cost, salvage, period [month]) C. =DB(salvage, cost, life, period [month]) D. =DB(cost, salvage, life, period [month])

Computer Science & Information Technology

 In a cost-benefit analysis, the calculated value associated with the most likely loss from an attack (impact) is known as __________. It is the product of the asset's value and the exposure factor.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology