Exam 4: Making Decisions

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

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

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

A

In C++ the = operator indicates:

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

B

This operator is known as the logical OR operator.

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

D

When a relational expression is false, it has the value ________.

(Multiple Choice)
4.9/5
(90)

The following code correctly determines whether x contains a value in the range of 0 through 100. if (x >= 0 && <= 100)

(True/False)
4.8/5
(86)

Without this statement appearing in a switch construct, the program "falls through" all of the statements below the one with the matching case expression.

(Multiple Choice)
4.9/5
(65)

Given the following code segment, what is output after "result = "? Given the following code segment, what is output after result = ?

(Multiple Choice)
4.8/5
(66)

If you intend to place a block of statements within an if statement, you must place these around the block.

(Multiple Choice)
4.8/5
(89)

Which statement allows you to properly check the char variable code to determine whether it is equal to a "C" and then output "This is a check" and then advance to a new line?

(Multiple Choice)
4.7/5
(87)

This operator is used in C++ to represent equality.

(Multiple Choice)
4.9/5
(84)

What is the output of the following segment of code if the value 4 is input by the user when asked to enter a number? What is the output of the following segment of code if the value 4 is input by the user when asked to enter a number?

(Multiple Choice)
4.8/5
(84)

What is the value of donuts after the following code executes? What is the value of donuts after the following code executes?

(Multiple Choice)
4.9/5
(95)

What will the following segment of code output? What will the following segment of code output?

(Multiple Choice)
4.8/5
(84)

As a rule of style, when writing an if statement you should indent the conditionally-executed statements.

(True/False)
4.9/5
(94)

What is the output of the following code? What is the output of the following code?

(Multiple Choice)
4.8/5
(81)

What will the following segment of code output if the value 11 is entered at the keyboard? What will the following segment of code output if the value 11 is entered at the keyboard?

(Multiple Choice)
4.8/5
(83)

Input values should always be checked for:

(Multiple Choice)
4.7/5
(82)

What will be the output of the following code segment after the user enters 0 at the keyboard? What will be the output of the following code segment after the user enters 0 at the keyboard?

(Multiple Choice)
4.8/5
(81)

You should be careful when using the equality operator to compare floating point values because of potential round-off errors.

(True/False)
4.8/5
(84)

Which line in the following program will cause a compiler error? Which line in the following program will cause a compiler error?

(Multiple Choice)
4.8/5
(77)
Showing 1 - 20 of 53
close modal

Filters

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