Content Frame
Note for screen reader users: There is text between the form elements on this page. To be sure that you do not miss any text, use item by item navigation methods, rather than tabbing from form element to form element
[Skip Breadcrumb Navigation]
Home  arrow Student Resources  arrow Chapter Quizzes  arrow Chapter 4

Chapter 4
Chapter 4 Quiz: Making Decisions And Working With Strings

This activity contains 10 questions.

Question 1
1 Which rational operator means ‘not equal to’ in Visual Basic?
 
End of Question 1


Question 2
2 Which is not a syntax rule for If…Then statements?
 
End of Question 2


Question 3
3 A Boolean variable that signals whether a condition exists is called a
 
End of Question 3


Question 4
4 Which of the following statements are true about If…Then…ElseIf statements:

i. If…Then…ElseIf statements evaluate the conditions until one is found to be true, executes the statements under the true condition, and then leaves the structure.

ii. If…Then…ElseIf statements are like a chain of If statements.

iii. If…Then ElseIf statements evaluate all statements in the structure once a true condition is found, and do not leave the structure until a break statement is encountered.

iv. An Else statement placed at the end of an If…Then…ElseIf statement ensures that a default action is always executed if none of the proceeding statement conditions in the If…Then…ElseIf structure were met.

 
End of Question 4


Question 5
5 The structure: If (condition I And condition II) Then is only true:
 
End of Question 5


Question 6
6 An If statement placed within the condition of another If statement is known as:
 
End of Question 6


Question 7
7 This operator reverses the truth value of an expression; making a true expression false and a false expression true.
 
End of Question 7


Question 8
8
Open Hint for Question 8 in a new window
Which string property or function returns the length of a string variable stored in strVar?

i. strVar.Length

ii. strVar.Len.

iii. Len(strVar).

iv. strVar.Trim

 
End of Question 8


Question 9
9 9. Which is the conversion for the following If...Then...ElseIf statement to a Select...Case statement?

If intValue > 0 and intValue <= 9 Then

discount = .10

Else If intValue >9 and intValue <20

discount = .15

Else

discount = .20

 
End of Question 9


Question 10
10
Open Hint for Question 10 in a new window
Which are characteristics of a CheckBox control?

i. only one check box can be selected at a time.

ii. you can use code to select or deselect a check box by using an assignment statement and the Checked property.

iii. a CheckChanged event is triggered whenever the user changes the state of a check box.

iv. a check box’s Checked property can only be set with an assignment statement during run time.

 
End of Question 10






Answer choices in this exercise appear in a different order each time the page is loaded.




Copyright © 1995-2008, Pearson Education, Inc., publishing as Pearson Addison Wesley
Legal and Privacy Terms
Pearson Education

[Return to the Top of this Page]