Exam 5: Making Decisions

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

The three basic programming constructs are simple sequence, selection, and iteration.

(True/False)
4.8/5
(84)

By properly ____________ the else clauses with their corresponding if clauses, you encounter fewer logic errors that necessitate debugging.

(Short Answer)
4.9/5
(83)

The switch statement also goes by the name ____________.

(Short Answer)
4.9/5
(98)

if (examScore is less than 50) Display message "Do better on next exam" In the statement above, the entry inside the parentheses is called the ____.

(Multiple Choice)
4.9/5
(94)

if (examScore > 89) Grade = 'A'; The expression above is considered a(n) ____.

(Multiple Choice)
4.9/5
(59)

You cannot use the ____________ statement to test for a range of values.

(Short Answer)
4.7/5
(76)

Iteration, also called selection is used for decision making and allows your program statements to deviate from the sequential path and perform different statements based on the value of an expression.

(True/False)
4.9/5
(78)

if (examScore > 89);      grade = 'A'; Using the code snippet above, when does grade get assigned a value of 'A'?

(Multiple Choice)
4.8/5
(79)

Using a single equal symbol inside a conditional expression, where a test was intended, causes a syntax error to be issued in C#.

(True/False)
4.8/5
(69)

With a switch statement, if no match is made, the statements associated with ____________ are executed.

(Short Answer)
4.9/5
(80)

Placing a semicolon onto the end of the conditional one-way if statement ____.

(Multiple Choice)
4.9/5
(81)

When you compare characters stored in char memory locations using relational operators, ____.

(Multiple Choice)
4.8/5
(67)

The switch statement case value can evaluate to all of the following EXCEPT ____.

(Multiple Choice)
4.8/5
(80)

switch (phoneDigit) {     case 1:   num = 1;      break;     case 2:   num = 2;      break;     case 3:   num = 3;      break;     case 4:   num = 4;      break;     default:  num = 0;                  break; } Looking at the example above, what happens if the break is omitted?

(Multiple Choice)
4.8/5
(74)

The conditional expression true || false produces false.

(True/False)
4.9/5
(80)
Showing 61 - 75 of 75
close modal

Filters

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