Exam 5: Making Decisions

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

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

Free
(True/False)
5.0/5
(94)
Correct Answer:
Verified

False

An exclamation point followed by a single equal symbol (!=)represents not equal in C#.

Free
(True/False)
5.0/5
(73)
Correct Answer:
Verified

True

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

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

C

The expression,(5 > 57 % 8),evaluates to ____.

(Multiple Choice)
4.8/5
(89)

____ perform differently based on their operands.

(Multiple Choice)
5.0/5
(89)

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

(Multiple Choice)
5.0/5
(69)

With ____________,as soon as the value of the entire expression is known,evaluation stops.

(Short Answer)
4.8/5
(75)

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

(Short Answer)
4.9/5
(84)

The logical operators in C# are ____.

(Multiple Choice)
4.9/5
(78)

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

(True/False)
4.8/5
(80)

The conditional expression true || false produces false.

(True/False)
4.7/5
(84)

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

(Short Answer)
4.9/5
(89)

When you have a single variable being tested for equality against four or more values,a one-way selection statement is the most appropriate type of conditional expression to use.

(True/False)
4.8/5
(80)

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

(Multiple Choice)
4.7/5
(54)

Conditional expressions produce a(n)____________ result.

(Short Answer)
4.9/5
(96)

if (amount > 1000) result = 1; else if (amount > 500) result = 2; else if (amount > 100) result = 3; else result = 4; -What is stored in result when amount is equal to 12000?

(Multiple Choice)
4.8/5
(98)

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
(79)

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

(True/False)
4.8/5
(76)

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

(True/False)
4.9/5
(97)

if (value1 > value2) largestOne = value1; Else If (value1 < value2) LargestOne = value2; Else LargestOne = -(value1); Using the nested if program statements,assuming value1 is 100 and value2 is 100,what is stored in largestOne above?

(Multiple Choice)
4.7/5
(73)
Showing 1 - 20 of 75
close modal

Filters

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