Exam 5: Making Decisions

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

When you place an if statement within another if statement, ____.

(Multiple Choice)
4.8/5
(88)

With the precedence rules or order of operations, ____________ operators are always listed at the bottom of the hierarchy.

(Short Answer)
4.8/5
(83)

The logical operators in C# are ____.

(Multiple Choice)
4.7/5
(73)

The rule for lining up, or matching, elses is that the else is matched with the first if, from top to bottom.

(True/False)
4.9/5
(66)

if (a > 10)    if (b > 10)       if (c > 10)           result =  1;       else           if (b > 100)              result = 2;           else Result = 3;     else       result = 4;   else     result = 5; Using the above code segment, w hat is stored in result when a, b and c are equal to 200?

(Multiple Choice)
4.9/5
(76)

The ____________ method will convert a string value sent as an argument to its equivalent numeric value, but it doesn't throw an exception when the conversion fails.

(Short Answer)
4.8/5
(79)

The switch statement is considered a multiple selection structure and it also goes by the name case statement.

(True/False)
4.8/5
(91)

The not equal (!=), and equal (==) symbols are overloaded operators.

(True/False)
4.9/5
(90)

String operands can be compared using the relational symbols. They are compared lexicographically using their Unicode character representation.

(True/False)
4.8/5
(82)

Two equal symbol characters == are used as the assignment operator.

(True/False)
4.9/5
(79)

if (examScore is less than 50) Display message "Do better on next exam" The result of the expression above is ____.

(Multiple Choice)
4.7/5
(83)

Conditional expressions produce a Boolean result.

(True/False)
4.7/5
(62)

A conditional expression is also referred to as a(n) ____________.

(Short Answer)
4.9/5
(68)

The ternary operator ( ?  :  ) provides another way to express a simple if...else selection statement.

(True/False)
4.9/5
(91)

if (amount > 1000)     result = 1; Else    if (amount > 500)       result = 2;    else       if (amount > 100)           result = 3;       else           result = 4; Using the above code segment, w hat is stored in result when amount is equal to 14?

(Multiple Choice)
4.9/5
(85)

In C#, both the break and default are optional entries found with a switch statement.

(True/False)
5.0/5
(83)

In C#, the && and || operators are also called the short-circuiting logical operators.

(True/False)
4.9/5
(87)

The assignment operators and the conditional operator ? : are right-associative.

(True/False)
4.9/5
(84)

The conditional expression, sometimes called "the test," must evaluate to true.

(True/False)
5.0/5
(73)

When a single variable may need to be tested for five different values, the most readable solution would be a(n) ____.

(Multiple Choice)
4.8/5
(81)
Showing 41 - 60 of 75
close modal

Filters

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