Visual Basic MCQs (Long Quiz)
This is the quiz about basics of Visual Basic Students and new learner's can test their knowledge.
Question 1 / 30
The Visual Basic Code Editor will automatically detect certain types of errors as you are entering the code.
True
False
Question 2 / 30
Keywords are also referred to as reserved words.
True
False
Question 3 / 30
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
Question 4 / 30
Visual Basic responds to events using which of the following?
a code procedure
an event procedure
a form procedure
a property
Question 5 / 30
Find when the user clicks a button, _________ is triggered.
an event
a method
a setting
a property
Question 6 / 30
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
Question 7 / 30
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.
Question 8 / 30
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
Question 9 / 30
Which of the properties in a control’s list of properties is used to give the control a meaningful name?
Text
ContextMenu
ControlName
Name
Question 10 / 30
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
Question 11 / 30
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
Question 12 / 30
A variable declared inside an event procedure is said to have local scope
True
False
Question 13 / 30
A variable declared outside of an event procedure is said to have the class-level scope.
True
False
Question 14 / 30
Option Explicit requires you to declare every variable before its use.
True
False
Question 15 / 30
The value returned by InputBox is a string.
True
False
Question 16 / 30
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
Question 17 / 30
Which of the following arithmetic operations has the highest level of precedence?
+ –
* /
^ exponentiation
( )
Question 18 / 30
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
Question 19 / 30
Which of the following is a valid name for a variable?
Two_One
2One
Two One
Two.One
Question 20 / 30
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).
Question 21 / 30
To continue a long statement on another line, use:
an underscore character
an ampersand character
Ctrl + Enter
a space followed by an underscore character
Question 22 / 30
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
Question 23 / 30
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
Question 24 / 30
The following lines of code are correct. If age >= 13 And < 20 Then txtOutput.Text = “You are a teenager.” End If
True
False
Question 25 / 30
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
Question 26 / 30
Asc(“A”) is 65. Find what is Asc(“C”)?
66
67
68
“C”
Question 27 / 30
Asc(“A”) is 65. Find what is displayed by txtBox.Text = Chr(65) & “BC”?
ABC
A BC
656667
Not enough information is available.
Question 28 / 30
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)
Question 29 / 30
Which of the following is true?
“Cat” = “cat”
“Cat” < “cat”
“Cat” > “cat”
Relational operators are only valid for numeric values.
Question 30 / 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
0
Dislike
0
Love
0
Funny
0
Wow
0
Sad
0
Angry
0
Comments (0)