Exam 5: Decision Structures

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

In an If...Then statement, the If keyword should appear on the first line with the conditional expression, and the Then keyword should appear on the second line.

Free
(True/False)
4.9/5
(39)
Correct Answer:
Verified

False

The ____ of a variable is defined by where it is declared within a program.

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

D

Visual Basic provides six different logical operators. Briefly describe the function of each.

Free
(Essay)
4.7/5
(39)
Correct Answer:
Verified

The And logical operator allows you to combine two or more conditions into a compound condition that can be tested with an If statement. If any of the conditions stated in the compound condition is false, the compound condition is considered false and the statements following the Else portion of the If statement will be executed. When the Or logical operator is used to connect two or more conditions, the compound condition is true if any tested condition is true. Even if four conditional statements are included in the compound condition, if one conditional statement in the compound condition is true, the entire statement is considered true. The Not logical operator allows you to state conditions that are best expressed in a negative way. In essence, it reverses the logical value of a condition on which it operates. With the Xor operator, when one condition in the compound is true, but not both, the compound condition is true. With the AndAlso operator, as soon as a condition is found to be false, no further conditions are tested and the compound condition is false. With the OrElse operator, as soon as a condition is found to be true, no further conditions are tested and the compound condition is true.

In a Select Case structure, the ____ statement includes all conditions not specifically tested for in the other Case statements.

(Multiple Choice)
4.8/5
(37)

To end a Select Case structure, a(n) ____ statement is used.

(Multiple Choice)
4.8/5
(28)

Case 5-2 Eric used to have a small reference card that he kept handy to remind him which MsgBoxButton arguments values translate to which buttons in the dialog box, but then he lost the card. He calls over to you for help in reminding him what values correspond to what. Now, Eric needs help in remembering which of the following options corresponds to a dialog box that displays an information icon and offers the Retry and Cancel buttons. Which of the following is the right answer?

(Multiple Choice)
5.0/5
(32)

In an If...Then...Else statement, if the condition is false, the statements between the Else and End If keywords will be executed.

(True/False)
4.8/5
(43)

The logical operator ____ has the highest priority and is evaluated first.

(Multiple Choice)
4.9/5
(43)

____________________ is the MsgBoxButtons argument that displays the Yes and No buttons.

(Short Answer)
4.9/5
(36)

Message boxes are also known as ____________________ boxes.

(Short Answer)
4.8/5
(37)

Statements for a true condition and statements for a false condition can both be executed based on a single comparison.

(True/False)
4.9/5
(29)

What are the steps for automatically indenting code in an If…Then statement?

(Essay)
4.9/5
(29)

Each code snippet consists of a complete programming task.

(True/False)
4.9/5
(32)

In a Select Case structure, each ____________________ statement specifies a value for which the test expression is checked.

(Short Answer)
4.8/5
(34)

Only one condition can be tested in an If statement.

(True/False)
4.9/5
(40)

When the object indicated by a RadioButton is selected by the user, the ____ property changes from False to True.

(Multiple Choice)
4.8/5
(41)

You can create your own code snippets but they cannot be added to the library.

(True/False)
4.8/5
(29)

An expression using the logical operator ____ will evaluate to true only when both of the conditions are true.

(Multiple Choice)
4.8/5
(39)

To test a second condition only after the result of the first condition is known, ____________________ If statements can be used.

(Short Answer)
4.9/5
(39)

The ____________________ procedure found in the MessageBox class is used to display a message in a message box.

(Short Answer)
4.9/5
(38)
Showing 1 - 20 of 103
close modal

Filters

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