Exam 4: Making Decisions

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

The default section of a switch statement performs a similar task similar to the __________ portion of an if/else if statement.

(Multiple Choice)
4.8/5
(29)

When a program lets the user know that an invalid choice has been made, this is known as:

(Multiple Choice)
4.8/5
(36)

What is the output of the following code segment? Int x = 5; If (x = 2) Cout << "This is true!" << endl; Else Cout << "This is False!" << endl; Cout << "That's all, folks!" << endl;

(Multiple Choice)
4.8/5
(28)

An expression that has any value other than 0 is considered true by an if statement.

(True/False)
4.9/5
(33)

What is the output of the following code segment if the user enters 23? Int number; Cout << "Enter a number: "; Cin >> number; If (number > 0) Cout << "Hi, there!" << endl; Else Cout << "Good-bye." << endl;

(Multiple Choice)
4.9/5
(37)

The __________ is an equality (or comparison) operator.

(Multiple Choice)
4.8/5
(34)

When a relational expression is False, it has the value

(Multiple Choice)
4.8/5
(31)

If the expression on the left side of the following is False, the expression on the right side will not be checked. (a > = b) && (c == d)

(True/False)
4.9/5
(34)

What is assigned to the variable result given the statement below with the following assumptions: X = 10, y = 7, and x, result, and y are all int variables. Result = x >= y;

(Multiple Choice)
4.8/5
(39)

What is the value of donuts after the following statement executes? int donuts = 10; if (donuts != 10) \quad donuts = 0; else \quad donuts += 2;

(Multiple Choice)
4.9/5
(36)

Given that x = 2, y = 1, z = 0, what will the following cout statement display? cout << "answer = " << (x || !y && z) << endl;

(Multiple Choice)
4.7/5
(39)
Showing 41 - 51 of 51
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)