Visual Basic MCQs (Long Quiz)

This is the quiz about basics of Visual Basic Students and new learner's can test their knowledge.

Jun 15, 2021 - 13:00
Jun 15, 2021 - 13:14
 0  163

1. The Visual Basic Code Editor will automatically detect certain types of errors as you are entering the code.

True
False

2. Keywords are also referred to as reserved words.

True
False

3. The divide-and-conquer method of problem-solving breaks a problem into large, general pieces first, then refines each piece until the problem is manageable.

True
False

4. Visual Basic responds to events using which of the following?

a code procedure
an event procedure
a form procedure
a property

5. Find when the user clicks a button, _________ is triggered.

an event
a method
a setting
a property

6. Find what property of controls tells the order they receive the focus Find when the tab key is pressed during run time?

Focus order
Focus number
Tab index
Control order

7. Sizing Handles make it very easy to resize virtually any control Find when developing applications with Visual Basic. Find when working in the Form Designer, how are these sizing handles displayed?

A rectangle with 4 arrows, one in each corner, around your control.
A 3-D outline around your control.
A rectangle with small squares around your control.
None of the above.

8. The Properties window plays an important role in the development of Visual Basic applications. It is mainly used

to change how objects look and feel
Find when opening programs stored on a hard drive
to allow the developer to graphically design program components
to set program related options like Program Name, Program Location, etc

9. Which of the properties in a control’s list of properties is used to give the control a meaningful name?

Text
ContextMenu
ControlName
Name

10. Pseudocode is

the incorrect results of a computer program
a program that doesn’t work
the obscure language computer personnel use Find when speaking
a description of an algorithm similar to a computer language

11. An algorithm is defined as:

a mathematical formula that solves a problem
a tempo for classical music played in a coda
a logical sequence of steps that solve a problem
a tool that designs computer programs and draws the user interface

12. A variable declared inside an event procedure is said to have local scope

True
False

13. A variable declared outside of an event procedure is said to have the class-level scope.

True
False

14. Option Explicit requires you to declare every variable before its use.

True
False

15. The value returned by InputBox is a string.

True
False

16. Find what is the correct statement Find when declaring and assigning the value of 100 to an Integer variable called numPeople

Dim numPeople =
Dim numPeople = Int(100)
numPeople = 100
Dim numPeople As Integer = 100

17. Which of the following arithmetic operations has the highest level of precedence?

+ –
* /
^ exponentiation
( )

18. Find what value will be assigned to the numeric variable x Find when the following statement is executed? x = 2 + 3 * 4

20
14
92
234

19. Which of the following is a valid name for a variable?

Two_One
2One
Two One
Two.One

20. Keywords in Visual Basic are words that

should be used Find when naming variables.
is used to name controls, such as TextBox1, Command2, etc.
have special meaning and should not be used Find when naming variables.
are used as prefixes for control names (such as text, btn, LBL, and lst).

21. To continue a long statement on another line, use:

an underscore character
an ampersand character
Ctrl + Enter
a space followed by an underscore character

22. Find what is the proper syntax Find when using a message dialog box?

MessageBox.Show(“Hi there”, “Hi”)
MessageBox.Show(Hi there, Hi)
MessageBox.Show “Hi There”, “Hi”
MessageBox.Show Hi There, Hi

23. Find what will be the output of the following statement? txtBox.Text = FormatCurrency(1234.567)

$1234.567
1,234.57
$1234.57
$1,234.57

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

True
False

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

26. Asc(“A”) is 65. Find what is Asc(“C”)?

66
67
68
“C”

27. Asc(“A”) is 65. Find what is displayed by txtBox.Text = Chr(65) & “BC”?

ABC
A BC
656667
Not enough information is available.

28. Which of the following expressions has as its value the words “Hello World? surrounded by quotation marks?

“Hello World”
Chr(34) & “Hello World”
Chr(34) & Hello World & Chr(34)
Chr(34) & “Hello World” & Chr(34)

29. Which of the following is true?

“Cat” = “cat”
“Cat” < “cat”
“Cat” > “cat”
Relational operators are only valid for numeric values.

30. Which of the following is a valid Visual Basic conditional statement?

2 < n < 5
2 < n Or < 5
2 < n Or 5
(2 < n) Or (n < 5)

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow