Examlex

Solved

Given the Following Switch Statement Where X Is an Int

question 21

Multiple Choice

Given the following switch statement where x is an int, answer the questions below
switch (x)
{
case 3 : x += 1;
case 4 : x += 2;
case 5 : x += 3;
case 6 : x++;
case 7 : x += 2;
case 8 : x--;
case 9 : x++
}
-If x is currently equal to 5, what will the value of x be after the switch statement executes?


Definitions:

Nullification Crisis

A confrontation between the state of South Carolina and the federal government in 1832-1833 over the state's attempt to nullify federal tariffs.

Secession

The act of withdrawing formally from membership in a federation or body, especially a political state.

Protective Tariffs

Duties levied on goods coming from abroad to safeguard local businesses from overseas competitors by increasing the cost of imports.

Second Seminole War

A conflict from 1835 to 1842 in Florida between the United States and the Seminole tribe, part of a series of conflicts known as the Seminole Wars.

Related Questions