Which data type is used to store true/false values in Visual Basic?
a) Bool
b) Boolean
c) Bit
d) TrueFalse
Explanation: The Boolean data type is used to store true/false values in Visual Basic.
In
Visual Basic, what is the purpose of the "Public" keyword when
declaring a variable?
a) It specifies that the variable can be accessed only within the same module.
b) It indicates that the variable is read-only and cannot be modified.
c) It allows the variable to be accessible from any module or form in the
application.
d) It declares the variable with a public data type.
Explanation: The "Public" keyword allows a variable to be accessed from anywhere in the application.
Which method is used to convert a string to an integer in Visual Basic?
a) ConvertInt()
b) ToInt()
c) Int.Parse()
d) StringToInt()
Explanation: The Int.Parse() method converts a string to an integer in Visual Basic.
What is the purpose of the "Alignment" property in Visual Basic for controls like Label and TextBox?
a) It specifies the size of the control.
b) It determines whether the control is visible or hidden.
c) It sets the background color of the control.
d) It aligns the text within the control.
Explanation: The Alignment property in Visual Basic aligns the text within a control.
Which event is triggered when a user closes a form in a Visual Basic application?
a) Close
b) Unload
c) Closer
d) Exit
Explanation: The Close event is triggered when a user closes a form in a Visual Basic application.
What is the purpose of the "Step" keyword in a for loop in Visual Basic?
a) It specifies the value to be added to the loop counter with each iteration.
b) It indicates the starting point of the loop.
c) It defines the condition for terminating the loop.
d) It sets the upper limit for the loop counter.
Explanation: The Step keyword in a For loop in Visual Basic specifies the increment value for the loop counter.