Quiz 4 Flashcards

1
Q

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

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

“1st Place” < “2nd Place”

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

The following two statements are equivalent:
Not (a < b)
a > b

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In Visual Basic, the letter j is considered to be greater than the letter y

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The And operator requires that both conditions be true for the compound condition to be
true

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

If two simple conditions are true, the compound condition created from them by the Or
operator is also true

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The condition “Y” = “y” is true

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

If two simple conditions are true, the compound condition created from them by the And
operator is also true

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The following condition evaluates to True:

“DOG” > “CAT”) And (“CAT” > “BIRD”) And (“BIRD” > “aardvark”

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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)).

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Is the following condition True or False
(assume a = 2, b = 3, and c = 3)?
(a = c) Or (b = c)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

< and = are examples of relational operator

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Conditions can involve variables, operators, and functions

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Two strings are compared working from left to right, character by character, to determine
which one should precede the other

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

The value of “education”.EndsWith(“on”) is True

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

The value of “education”.StartsWith(“ED”) is True

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

The value of IsNumeric(“$20.00”) is True

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

The value of IsNumeric(“Twenty”) is True

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

When an If block has completed execution, the program instruction immediately following
the If block is executed

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

The following lines of code are correct.:
If (txtAge.Text >= 62) Then
txtOutput.Text = “You are elegible to collect Social Security.”
End If

A

False

23
Q

The following lines of code are correct.
If age >= 13 And < 20 Then
txtOutput.Text = “You are a teenager.”
End If

A

False

24
Q

The Else part of an If block may be omitted if no action is associated with it

A

True

25
Q

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

A

True

26
Q

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

A

False

27
Q

Every If block must have a Then and an Else

A

False

28
Q

No more than one ElseIf statement may occur in any one If block

A

False

29
Q

No more than one Else statement may occur in any one If block

A

True

30
Q

A variable declared inside an If block ceases to exist after the block is exited

A

True

31
Q

The following line of code is valid.

If letter = (“The quality of mercy is not strained”).Substring(7, 1) Then

A

True

32
Q

The following line of code is valid.

If 0 ≤ grade ≤ 100 Then

A

False

33
Q

The Case Else part of a Select Case block is optional

A

True

34
Q

One may use an If block within a Select Case block

A

True

35
Q

One may use a Select Case block within an If block

A

True

36
Q

Every Select Case block can be replaced by If blocks

A

True

37
Q

One may use a Select Case block within another Select Case block

A

True

38
Q

Select Case choices are determined by the value of an expression called a selector.

A

True

39
Q

Items in the value list must evaluate to a literal of the same type as the selector.

A

True

40
Q

A single Case statement can contain multiple values

A

True

41
Q

You can specify a range of values in a Case clause by using the To keyword.

A

True

42
Q

A variable declared inside a Select Case block cannot be referred to by code outside of the
block

A

True

43
Q

Clicking on a checked radio button unchecks the radio button

A

False

44
Q

Clicking on a checked check box unchecks the check box

A

True

45
Q

The value of lstBox.Text is the currently selected item of the list box

A

True

46
Q

After several controls of the same type have been created, they can be moved inside a group
box and thereby become attached to it

A

True

47
Q

With a check box control, toggling the state of the small square raises the CheckChanged
event

A

True

48
Q

Group boxes are passive objects used to group related sets of controls.

A

True

49
Q

Programmers frequently write event procedures for the group box control

A

False

50
Q

If you set a group box control’s Visible property to False, the attached controls will still
remain visible

A

False

51
Q

When a check box control has the focus, the spacebar can be used to invoke its
CheckedChanged event.

A

True

52
Q

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

A

True

53
Q

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

A

True