This section presents you various set of Mock Tests related to VB.Net. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Q 1 - Which of the following accesss modifier specifies that Visual Basic should marshal all strings to Unicode values regardless of the name of the external procedure being declared?
Unicode − Specifies that Visual Basic should marshal all strings to Unicode values regardless of the name of the external procedure being declared.
Q 2 - Which of the following accesss modifier indicates that a conversion operator (CType) converts a class or structure to a type that can hold all possible values of the original class or structure?
Widening − Indicates that a conversion operator (CType) converts a class or structure to a type that can hold all possible values of the original class or structure.
Q 3 - Which of the following accesss modifier specifies that one or more declared member variables refer to an instance of a class that can raise events?
WithEvents − Specifies that one or more declared member variables refer to an instance of a class that can raise events.
Q 4 - Which of the following accesss modifier specifies that a property can be written but not read?
WriteOnly − Specifies that a property can be written but not read.
Q 5 - Which of the following statement declares and allocates storage space for one or more variables?
Dim − Declares and allocates storage space for one or more variables.
Q 6 - Which of the following statement declares and defines one or more constants?
Const − Declares and defines one or more constants.
Q 7 - Which of the following statement declares an enumeration and defines the values of its members?
Enum − Declares an enumeration and defines the values of its members.
Q 8 - Which of the following statement declares the name of a class and introduces the definition of the variables, properties, events, and procedures that the class comprises?
Class − Declares the name of a class and introduces the definition of the variables, properties, events, and procedures that the class comprises.
Q 9 - Which of the following statement declares the name of a structure and introduces the definition of the variables, properties, events, and procedures that the structure comprises?
Structure − Declares the name of a structure and introduces the definition of the variables, properties, events, and procedures that the structure comprises.
Q 10 - Which of the following statement declares the name of a module and introduces the definition of the variables, properties, events, and procedures that the module comprises?
Module − Declares the name of a module and introduces the definition of the variables, properties, events, and procedures that the module comprises.
Q 11 - Which of the following statement declares the name of an interface and introduces the definitions of the members that the interface comprises?
Interface − Declares the name of an interface and introduces the definitions of the members that the interface comprises.
Q 12 - Which of the following statement declares the name, parameters, and code that define a Function procedure?
Function − Declares the name, parameters, and code that define a Function procedure.
Q 13 - Which of the following statement declares the name, parameters, and code that define a Sub procedure?
Sub − Declares the name, parameters, and code that define a Sub procedure.
Q 14 - Which of the following statement declares a reference to a procedure implemented in an external file?
Declare − Declares a reference to a procedure implemented in an external file.
Q 15 - Which of the following statement declares the operator symbol, operands, and code that define an operator procedure on a class or structure?
Operator − Declares the operator symbol, operands, and code that define an operator procedure on a class or structure.
Q 16 - Which of the following statement declares the name of a property, and the property procedures used to store and retrieve the value of the property?
Property − Declares the name of a property, and the property procedures used to store and retrieve the value of the property.
Q 17 - Which of the following statement declares a user-defined event?
Event − Declares a user-defined event.
Q 18 - Which of the following statement is used to declare a delegate?
Delegate − Used to declare a delegate.
Q 19 - Which of the following directive defines conditional compiler constants?
#Const − This directive defines conditional compiler constants.
Q 20 - Which of the following directive is used for indicating a mapping between specific lines of source code and text external to the source?
#ExternalSource − This directive is used for indicating a mapping between specific lines of source code and text external to the source. It is used only by the compiler and the debugger has no effect on code compilation. This directive allows including external code from an external code file into a source code file.
Q 21 - Which of the following directive conditionally compiles selected blocks of Visual Basic code?
#If...Then...#Else − This directive conditionally compiles selected blocks of Visual Basic code.
Q 22 - Which of the following directive helps in collapsing and hiding sections of code in Visual Basic files?
#Region − This directive helps in collapsing and hiding sections of code in Visual Basic files.
Q 23 - Which of the following operator returns the address of a procedure?
AddressOf − Returns the address of a procedure.
Q 24 - Which of the following operator is applied to an operand in an asynchronous method or lambda expression to suspend execution of the method until the awaited task completes?
Await − It is applied to an operand in an asynchronous method or lambda expression to suspend execution of the method until the awaited task completes.
Q 25 - Which of the following operator returns a Type object for the specified type?
GetType − It returns a Type object for the specified type. The Type object provides information about the type such as its properties, methods, and events.
Question Number | Answer Key |
---|---|
1 | D |
2 | A |
3 | B |
4 | C |
5 | A |
6 | B |
7 | C |
8 | D |
9 | A |
10 | B |
11 | C |
12 | D |
13 | A |
14 | B |
15 | C |
16 | D |
17 | A |
18 | B |
19 | A |
20 | B |
21 | C |
22 | D |
23 | A |
24 | B |
25 | C |