# CHAPTER04

**Topics:**Check box, Widgets, Radio button

**Pages:**28 (3467 words)

**Published:**January 25, 2015

Section 4.1 Relational and Logical Operators

1.

Asc("A")

(A)

(B)

(C)

(D)

2.

3.

66

67

68

"C"

B

Asc("A")

(A)

(B)

(C)

(D)

is 65. What is Asc("C")?

is 65. What is displayed by txtBox.Text = Chr(65) & "BC"?

ABC

A BC

656667

Not enough information is available.

A

Which of the following expressions has as its value the words "Hello World” surrounded by quotation marks?

(A)

(B)

(C)

(D)

"Hello World"

Chr(34) & "Hello World"

Chr(34) & Hello World & Chr(34)

Chr(34) & "Hello World" & Chr(34)

D

4.

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. (T/F) F

5.

Which of the following is true?

(A)

(B)

(C)

(D)

6.

"Cat" = "cat"

"Cat" < "cat"

"Cat" > "cat"

Relational operators are only valid for numeric values.

B

Which of the following is a valid Visual Basic conditional statement? (A)

(B)

(C)

(D)

2 < n < 5

2 < n Or < 5

2 < n Or 5

(2 < n) Or (n < 5)

D

7.

Which statement is true?

(A)

(B)

(C)

(D)

8.

Which statement is false?

(A)

(B)

(C)

(D)

9.

"Ford" < "Ford"

“Chevy” > “Chevy”

“GMC” “oldsmobile” < “Oldsmobile”

C

"Ford" >= "Ford"

"Chevy" (B)

(C)

(D)

only the left part

only the right par

both parts

either the left or right part, but not both

C

12. When using the logical operator “Or”, what part of the expression must be true? (A)

(B)

(C)

(D)

only the left part

only the right part

either the left or right part, but not both

either the left or right part

D

13. When is the expression “Not cond1” true?

(A)

(B)

(C)

(D)

when cond1 is false

when cond1 is true

when cond1 is either true or false

None of the above

A

14. Which value for x would make the following condition true: x >= 5 (A)

(B)

(C)

(D)

x is equal to 7

x is equal to 5

x is equal to 5.001

All of the above

D

15. Which value for x would make the following condition true: Not (x >= 5) (A)

(B)

(C)

(D)

x is equal to 7

x is equal to 4

x is equal to 5.001

All of the above

B

16. Which value for x would make the following condition true: (x >= 5) And (x T

18. The following two statements are equivalent. (T/F)

Not (a < b)

a > b

F

19. In Visual Basic, the letter j is considered to be greater than the letter y. (T/F) F

20. The And operator requires that both conditions be true for the compound condition to be true. (T/F)

T

21. If two simple conditions are true, the compound condition created from them by the Or operator is also true. (T/F)

T

22. The condition "Y" = "y" is true. (T/F)

F

23. If two simple conditions are true, the compound condition created from them by the And operator is also true. (T/F)

T

24. The following condition evaluates to True. (T/F)

("DOG" > "CAT") And ("CAT" > "BIRD") And ("BIRD" > "aardvark")

F

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

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

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

28. Is the following condition True or False (assume...

Continue Reading

Please join StudyMode to read the full document