Exam 5: Making Decisions

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

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 14?

(Multiple Choice)
4.8/5
(87)

Which of the following is NOT one of the basic programming constructs?

(Multiple Choice)
4.8/5
(73)

Selection statements must include a Boolean variable.

(True/False)
4.9/5
(80)

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

(Multiple Choice)
4.7/5
(75)

The equality operator in C# is represented by ____________.

(Short Answer)
4.9/5
(76)

These categories are referred to as the basic programming constructs are simple sequence,iteration and ____________.

(Short Answer)
4.9/5
(83)

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.9/5
(74)

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

(Short Answer)
4.7/5
(75)

Equality comparisons with floating-point and decimal types often produce unpredictable results.

(True/False)
4.9/5
(73)

Conditional expressions produce a Boolean result.

(True/False)
4.8/5
(78)

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

(Short Answer)
4.9/5
(91)

Relational operators allow you to test variables to see if one is greater or less than another variable or value.

(True/False)
4.9/5
(90)

if (examScore > 89) grade = 'A'; Console.WriteLine("Excellent"); Using the code snippet above,when does Excellent get displayed?

(Multiple Choice)
4.7/5
(81)

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

In the statement above,the entry inside the parentheses is called the ____.

(Multiple Choice)
4.8/5
(76)

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

(Multiple Choice)
4.9/5
(85)

The result of the expression above is ____.

(Multiple Choice)
4.9/5
(83)

Which of the following statements is NOT true regarding switch statements?

(Multiple Choice)
4.9/5
(84)

No fall through is permitted in C# if the previous case label has code.

(True/False)
4.8/5
(79)

The conditional operator,also called the ____________ provides another way to express a simple if...else selection statement.

(Short Answer)
5.0/5
(73)
Showing 41 - 60 of 75
close modal

Filters

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