Quiz 4 Flashcards
The statement
txtBox.Text = Chr(162)
causes Visual Basic to display the cents symbol
(ANSI 162) in the text box, regardless of the font in use
False
“1st Place” < “2nd Place”
True
The following two statements are equivalent:
Not (a < b)
a > b
False
In Visual Basic, the letter j is considered to be greater than the letter y
False
The And operator requires that both conditions be true for the compound condition to be
true
True
If two simple conditions are true, the compound condition created from them by the Or
operator is also true
True
The condition “Y” = “y” is true
False
If two simple conditions are true, the compound condition created from them by the And
operator is also true
True
The following condition evaluates to True:
“DOG” > “CAT”) And (“CAT” > “BIRD”) And (“BIRD” > “aardvark”
False
Assume that A, B, and C are conditions, with A being true, B being true, and C being false.
Give the truth value of (A And (Not B))
False
Assume that A, B, and C are conditions, with A being true, B being true, and C being false.
Give the truth value of (A And Not (B or C)).
False
Assume that A, B, and C are conditions, with A being true, B being true, and C being false.
Give the truth value of (Not (A And B))
False
Is the following condition True or False
(assume a = 2, b = 3, and c = 3)?
(a = c) Or (b = c)
True
< and = are examples of relational operator
True
Conditions can involve variables, operators, and functions
True
Two strings are compared working from left to right, character by character, to determine
which one should precede the other
True
The value of “education”.EndsWith(“on”) is True
True
The value of “education”.StartsWith(“ED”) is True
False
The value of IsNumeric(“$20.00”) is True
True
The value of IsNumeric(“Twenty”) is True
False
When an If block has completed execution, the program instruction immediately following
the If block is executed
True
The following lines of code are correct.:
If (txtAge.Text >= 62) Then
txtOutput.Text = “You are elegible to collect Social Security.”
End If
False
The following lines of code are correct.
If age >= 13 And < 20 Then
txtOutput.Text = “You are a teenager.”
End If
False
The Else part of an If block may be omitted if no action is associated with it
True
Given that x = 7, y = 2, and z = 4, the following If block will display “TRUE”.
If (x > y) Or (y > z) Then
txtBox.Text = “TRUE”
End If
True
Given that x = 7, y = 2, and z = 4, the following If block will display “TRUE”.
If (x > y) And (y > z) Then
txtBox.Text = “TRUE”
End If
False
Every If block must have a Then and an Else
False
No more than one ElseIf statement may occur in any one If block
False
No more than one Else statement may occur in any one If block
True
A variable declared inside an If block ceases to exist after the block is exited
True
The following line of code is valid.
If letter = (“The quality of mercy is not strained”).Substring(7, 1) Then
True
The following line of code is valid.
If 0 ≤ grade ≤ 100 Then
False
The Case Else part of a Select Case block is optional
True
One may use an If block within a Select Case block
True
One may use a Select Case block within an If block
True
Every Select Case block can be replaced by If blocks
True
One may use a Select Case block within another Select Case block
True
Select Case choices are determined by the value of an expression called a selector.
True
Items in the value list must evaluate to a literal of the same type as the selector.
True
A single Case statement can contain multiple values
True
You can specify a range of values in a Case clause by using the To keyword.
True
A variable declared inside a Select Case block cannot be referred to by code outside of the
block
True
Clicking on a checked radio button unchecks the radio button
False
Clicking on a checked check box unchecks the check box
True
The value of lstBox.Text is the currently selected item of the list box
True
After several controls of the same type have been created, they can be moved inside a group
box and thereby become attached to it
True
With a check box control, toggling the state of the small square raises the CheckChanged
event
True
Group boxes are passive objects used to group related sets of controls.
True
Programmers frequently write event procedures for the group box control
False
If you set a group box control’s Visible property to False, the attached controls will still
remain visible
False
When a check box control has the focus, the spacebar can be used to invoke its
CheckedChanged event.
True
As with the button and check box controls, an access key can be set up by placing an
ampersand in front of a letter in the radio button’s Text property setting
True
Suppose a form contains two group box controls with one radio button placed on each. In
this case, both radio buttons can be selected (or turned “on”) at the same time
True