Exam 4: Control Structures I Selection

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

Putting ____________________ in front of a logical expression reverses the value of that logical expression.

Free
(Short Answer)
4.9/5
(33)
Correct Answer:
Verified

!

You can disable assert statements by using which of the following?

Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
Verified

D

In a ____ control structure, the computer executes particular statements depending on some condition(s).

Free
(Multiple Choice)
5.0/5
(36)
Correct Answer:
Verified

C

In C++, !, &&, and || are called relational operators.

(True/False)
5.0/5
(41)

For a program to use the assert function, it must include which of the following?

(Multiple Choice)
4.8/5
(33)

The operators != and == have the same order of precedence.

(True/False)
4.9/5
(38)

The value of the expression 7 + 8 <= 15 is ____________________.

(Short Answer)
4.9/5
(31)

Which of the following operators has the highest precedence?

(Multiple Choice)
4.9/5
(37)

When one control statement is located within another, it is said to be ____.

(Multiple Choice)
4.8/5
(37)

To develop a program, you can use an informal mixture of C++ and ordinary language, called ____.

(Multiple Choice)
4.8/5
(38)

What is the output of the following C++ code? int x = 55; int y = 5; switch (x % 7) { case 0: case 1: \quad y++; case 2: case 3: y = y + 2; case 4: \quad break; case 5: case 6: \quad y = y - 3; } cout << y << endl;

(Multiple Choice)
4.8/5
(47)

A(n) ____________________ structure does not require the evaluation of a logical expression.

(Short Answer)
4.9/5
(35)

To output results correctly, the switch structure must include a(n) ____________________ statement after each cout statement, except the last cout statement.

(Short Answer)
4.8/5
(46)

Which of the following is a relational operator?

(Multiple Choice)
4.8/5
(34)

What is the output of the following code? char lastInitial = 'A'; Switch (lastInitial) { case 'A': \quad cout << "section 1" << endl; \quad break; case 'B': \quad cout << "section 2" << endl; \quad break; case 'C': \quad cout << "section 3" << endl; \quad break; case 'D': \quad cout << "section 4" << endl; \quad break; default: \quad cout << "section 5" << endl; }

(Multiple Choice)
4.8/5
(29)

Which of the following is the "not equal to" relational operator?

(Multiple Choice)
4.8/5
(38)

In C++, the logical operator AND is represented by ____________________.

(Short Answer)
4.9/5
(38)

The appearance of = in place of == resembles a(n) ____.

(Multiple Choice)
4.9/5
(35)

In C++, && has a higher precedence than ||.

(True/False)
4.7/5
(39)

A ____________________ operator allows you to make comparisions in a program.

(Short Answer)
4.8/5
(35)
Showing 1 - 20 of 50
close modal

Filters

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