Exam 5: Control Statements, Logical Operators

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

Which of the following is true?

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

B

Which of the following is correct when labeling cases in a switch structure?

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

C

Switch can be used to test:

Free
(Multiple Choice)
4.9/5
(40)
Correct Answer:
Verified

A

Which of the following for headers produces the values from 27 through 3, decrementing by 3?

(Multiple Choice)
4.9/5
(31)

Float and double variables should be used:

(Multiple Choice)
4.8/5
(36)

Which of the following is false?

(Multiple Choice)
4.9/5
(35)

An example of a unary operator is:

(Multiple Choice)
4.8/5
(41)

Which of the following is false?

(Multiple Choice)
4.8/5
(21)

The ____________, __________ and ____________ are the only three forms of control necessary.

(Multiple Choice)
4.9/5
(27)

Which of the following is not one the rules for forming structured programs?

(Multiple Choice)
4.8/5
(40)

Variables are also known as:

(Multiple Choice)
4.8/5
(31)

In a switch statement:

(Multiple Choice)
4.7/5
(31)

Consider the following code, assuming that x is an int with an initial value of 12 if(x = 6) { Cout << x; } What is the output?

(Multiple Choice)
4.8/5
(41)

Consider the execution of the following for loop for (int x = 1; x < 5; increment) { Cout << x + 1 << endl; } If the last value printed is 5, which of the following might have been used for increment?

(Multiple Choice)
4.8/5
(32)

In C++, the condition (4 > y > 1):

(Multiple Choice)
4.8/5
(32)

Which of the following is not one of the C++ control structures?

(Multiple Choice)
4.8/5
(37)

The expression if (num != 65) cannot be replaced by:

(Multiple Choice)
4.7/5
(27)

Of the following, which is not a logic error?

(Multiple Choice)
4.7/5
(30)

Which of the following for headers is not valid?

(Multiple Choice)
4.8/5
(36)

Which of the following is a poor programming practice?

(Multiple Choice)
4.7/5
(34)
Showing 1 - 20 of 31
close modal

Filters

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