VB.Net
Quiz
Q 1 - Which of the following is a basic data type in VB.NET?
A - Boolean
B - Byte
C - Char
D - All of the above.
Answer : D
Explanation
All of the above are basic data types.
Q 2 - Which of the following converts the expression to Decimal data type in VB.NET?
A - CDbl(expression)
B - CDec(expression)
C - CInt(expression)
D - CLng(expression)
Answer : B
Explanation
CDec(expression) − Converts the expression to Decimal data type.
Q 3 - Which of the following accesss modifier specifies that one or more declared programming elements are accessible
from within the assembly that contains their declaration, not only by the component that declares them?
A - ByRef
B - ByVal
C - Default
D - Friend
Answer : D
Explanation
Friend − Specifies that one or more declared programming elements are accessible from within the assembly that
contains their declaration, not only by the component that declares them.
Q 4 - Which of the following accesss modifier specifies that a property or procedure redeclares one or more existing
properties or procedures with the same name?
A - NotOverridable
B - Optional
C - Out
D - Overloads
Answer : D
Explanation
Overloads − Specifies that a property or procedure redeclares one or more existing properties or procedures with the
same name.
Q 5 - Which of the following accesss modifier allows you to pass an arbitrary number of arguments to the procedure?
A - Overridable
B - Overrides
C - ParamArray
D - Partial
Answer : C
Explanation
ParamArray − ParamArray allows you to pass an arbitrary number of arguments to the procedure. A ParamArray
parameter is always declared using ByVal.
Q 6 - Which of the following statement declares and allocates storage space for one or more variables?
A - Dim
B - Const
C - Enum
D - Class
Answer : A
Explanation
Dim − Declares and allocates storage space for one or more variables.
Q 7 - 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?
A - Sub
B - Declare
C - Operator
D - Property
Answer : D
Explanation
Property − Declares the name of a property, and the property procedures used to store and retrieve the value of the
property.
Q 8 - Which of the following operator uses short-circuit evaluation to conditionally return one of two values?
A - If
B - Await
C - GetType
D - Function Expression
Answer : A
Explanation
If − It uses short-circuit evaluation to conditionally return one of two values. The If operator can be called with three
arguments or with two arguments.
Q 9 - Which of the following property of Array class in VB.NET checks whether the Array has a fixed size?
A - IsFixedSize
B - IsStatic
C - Length
D - None of the above.
Answer : A
Explanation
IsFixedSize gets a value indicating whether the Array has a fixed size.
Q 10 - Which of the following block of VB.NET identifies a block of code for which particular exceptions will be activated?
A - Try
B - Catch
C - Finally
D - Throw
Answer : A
Explanation
Try − A Try block identifies a block of code for which particular exceptions will be activated. It's followed by one or more
Catch blocks.
VB.Net Mock Test I
Q 1 - Which of the following is correct about VB.NET?
A - Visual Basic .NET (VB.NET) is an object-oriented computer programming language implemented on the .NET Framework.
B - It is not backwards-compatible with VB6, and any code written in the old version does not compile under VB.NET.
C - Both of the above.
D - None of the above.
Q 2 - Which of the following is correct about VB.NET?
A - VB.NET has complete support for object-oriented concepts. VB.NET has complete support for object-oriented concepts.
B - Everything in VB.NET is an object, including all of the primitive types (Short, Integer, Long, String, Boolean, etc.) and user-
defined types, events, and even assemblies.
C - All objects inherits from the base class Object.
D - All of the above.
Q 3 - Which of the following is an entry point method of VB.NET program?
A - Sub Main
B - function main
C - Both of the above.
D - None of the above.
Q 4 - Which of the following is a basic data type in VB.NET?
A - Boolean
B - Byte
C - Char
D - All of the above.
Q 5 - Which of the following is a true about Object in VB.NET?
A - Object variable size is 4 bytes on 32-bit platform.
B - Object variable size is 8 bytes on 64-bit platform.
C - Any type can be stored in a variable of type Object.
D - All of the above.
Q 6 - Which of the following converts the expression to Boolean data type in VB.NET?
A - CBool(expression)
B - CByte(expression)
C - CChar(expression)
D - CDate(expression)
Q 7 - Which of the following converts the expression to Byte data type in VB.NET?
A - CBool(expression)
B - CByte(expression)
C - CChar(expression)
D - CDate(expression)
Q 8 - Which of the following converts the expression to Char data type in VB.NET?
A - CBool(expression)
B - CByte(expression)
C - CChar(expression)
D - CDate(expression)
Q 9 - Which of the following converts the expression to Date data type in VB.NET?
A - CBool(expression)
B - CByte(expression)
C - CChar(expression)
D - CDate(expression)
Q 10 - Which of the following converts the expression to Double data type in VB.NET?
A - CDbl(expression)
B - CDec(expression)
C - CInt(expression)
D - CLng(expression)
Q 11 - Which of the following converts the expression to Decimal data type in VB.NET?
A - CDbl(expression)
B - CDec(expression)
C - CInt(expression)
D - CLng(expression)
Q 12 - Which of the following converts the expression to Integer data type in VB.NET?
A - CDbl(expression)
B - CDec(expression)
C - CInt(expression)
D - CLng(expression)
Q 13 - Which of the following converts the expression to Long data type in VB.NET?
A - CDbl(expression)
B - CDec(expression)
C - CInt(expression)
D - CLng(expression)
Q 14 - Which of the following converts the expression to Object data type in VB.NET?
A - CObj(expression)
B - CSByte(expression)
C - CShort(expression)
D - CSng(expression)
Q 15 - Which of the following converts the expression to SByte data type in VB.NET?
A - CObj(expression)
B - CSByte(expression)
C - CShort(expression)
D - CSng(expression)
Q 16 - Which of the following converts the expression to Short data type in VB.NET?
A - CObj(expression)
B - CSByte(expression)
C - CShort(expression)
D - CSng(expression)
Q 17 - Which of the following converts the expression to Single data type in VB.NET?
A - CObj(expression)
B - CSByte(expression)
C - CShort(expression)
D - CSng(expression)
Q 18 - Which of the following converts the expression to String data type in VB.NET?
A - CStr(expression)
B - CSByte(expression)
C - CShort(expression)
D - CSng(expression)
Q 19 - Which of the following accesss modifier specifies that Visual Basic should marshal all strings to American National Standards
Institute (ANSI) values regardless of the name of the external procedure being declared in VB.NET?
A - Ansi
B - Assembly
C - Async
D - Auto
Q 20 - Which of the following accesss modifier specifies that an attribute at the beginning of a source file applies to the entire
assembly?
A - Ansi
B - Assembly
C - Async
D - Auto
Q 21 - Which of the following accesss modifier indicates that the method or lambda expression that it modifies is asynchronous?
A - Ansi
B - Assembly
C - Async
D - Auto
Q 22 - Which of the following accesss modifier specifies that Visual Basic should marshal strings according to .NET Framework
rules?
A - Ansi
B - Assembly
C - Async
D - Auto
Q 23 - Which of the following accesss modifier specifies that an argument is passed by reference?
A - ByRef
B - ByVal
C - Default
D - Friend
Q 24 - Which of the following is true about catch block in VB.NET?
A - A program catches an exception with an exception handler at the place in a program where you want to handle the problem.
B - The catch keyword indicates the catching of an exception.
C - Both of the above.
D - None of the above.
Q 25 - Which of the following accesss modifier specifies that an argument is passed in such a way that the called procedure or
property cannot change the value of a variable underlying the argument in the calling code?
A - ByRef
B - ByVal
C - Default
D - Friend
QuestionNumber AnswerKey
1 C
2 D
3 A
4 D
5 D
6 A
7 B
8 C
9 D
10 A
11 B
12 C
13 D
14 A
15 B
16 C
17 D
18 A
19 A
20 B
21 C
22 D
23 A
24 C
25 B
VB.Net Mock Test II
Q 1 - Which of the following accesss modifier identifies a property as the default property of its class, structure, or interface?
A - ByRef
B - ByVal
C - Default
D - Friend
Q 2 - Which of the following accesss modifier specifies that one or more declared programming elements are accessible from within the
assembly that contains their declaration, not only by the component that declares them?
A - ByRef
B - ByVal
C - Default
D - Friend
Q 3 - Which of the following accesss modifier is used in generic interfaces and delegates?
A - In
B - Iterator
C - Key
D - Module
Q 4 - Which of the following accesss modifier specifies that a function or Get accessor is an iterator?
A - In
B - Iterator
C - Key
D - Module
Q 5 - Which of the following accesss modifier enables you to specify behavior for properties of anonymous types?
A - In
B - Iterator
C - Key
D - Module
Q 6 - Which of the following accesss modifier specifies that an attribute at the beginning of a source file applies to the current assembly
module?
A - In
B - Iterator
C - Key
D - Module
Q 7 - Which of the following accesss modifier specifies that a class can be used only as a base class and that you cannot create an object
directly from it?
A - MustInherit
B - MustOverride
C - Narrowing
D - NotInheritable
Q 8 - Which of the following accesss modifier specifies that a property or procedure is not implemented in this class and must be
overridden in a derived class before it can be used?
A - MustInherit
B - MustOverride
C - Narrowing
D - NotInheritable
Q 9 - Which of the following accesss modifier indicates that a conversion operator (CType) converts a class or structure to a type that
might not be able to hold some of the possible values of the original class or structure?
A - MustInherit
B - MustOverride
C - Narrowing
D - NotInheritable
Q 10 - Which of the following accesss modifier specifies that a class cannot be used as a base class?
A - MustInherit
B - MustOverride
C - Narrowing
D - NotInheritable
Q 11 - Which of the following accesss modifier specifies that a property or procedure cannot be overridden in a derived class?
A - NotOverridable
B - Optional
C - Out
D - Overloads
Q 12 - Which of the following accesss modifier specifies that a procedure argument can be omitted when the procedure is called?
A - NotOverridable
B - Optional
C - Out
D - Overloads
Q 13 - Which of the following accesss modifier specifies that the type is covariant?
A - NotOverridable
B - Optional
C - Out
D - Overloads
Q 14 - Which of the following accesss modifier specifies that a property or procedure redeclares one or more existing properties or
procedures with the same name?
A - NotOverridable
B - Optional
C - Out
D - Overloads
Q 15 - Which of the following accesss modifier specifies that a property or procedure can be overridden by an identically named prop erty
or procedure in a derived class?
A - Overridable
B - Overrides
C - ParamArray
D - Partial
Q 16 - Which of the following accesss modifier specifies that a property or procedure overrides an identically named property or procedure
inherited from a base class?
A - Overridable
B - Overrides
C - ParamArray
D - Partial
Q 17 - Which of the following accesss modifier allows you to pass an arbitrary number of arguments to the procedure?
A - Overridable
B - Overrides
C - ParamArray
D - Partial
Q 18 - Which of the following accesss modifier indicates that a class or structure declaration is a partial definition of the class or structure?
A - Overridable
B - Overrides
C - ParamArray
D - Partial
Q 19 - Which of the following accesss modifier specifies that one or more declared programming elements are accessible only from within
their declaration context, including from within any contained types?
A - Private
B - Protected
C - Public
D - ReadOnly
Q 20 - Which of the following accesss modifier specifies that one or more declared programming elements are accessible only from within
their own class or from a derived class?
A - Private
B - Protected
C - Public
D - ReadOnly
Q 21 - Which of the following accesss modifier specifies that one or more declared programming elements have no access restrictions?
A - Private
B - Protected
C - Public
D - ReadOnly
Q 22 - Which of the following accesss modifier specifies that a variable or property can be read but not written?
A - Private
B - Protected
C - Public
D - ReadOnly
Q 23 - Which of the following accesss modifier specifies that a declared programming element redeclares and hides an identically named
element, or set of overloaded elements, in a base class?
A - Shadows
B - Shared
C - Static
D - Unicode
Q 24 - Which of the following accesss modifier specifies that one or more declared programming elements are associated with a class or
structure at large, and not with a specific instance of the class or structure?
A - Shadows
B - Shared
C - Static
D - Unicode
Q 25 - Which of the following accesss modifier specifies that one or more declared local variables are to continue to exist and retain their
latest values after termination of the procedure in which they are declared?
A - Shadows
B - Shared
C - Static
D - Unicode
Question Number Answer Key
1 C
2 D
3 A
4 B
5 C
6 D
7 A
8 B
9 C
10 D
11 A
12 B
13 C
14 D
15 A
16 B
17 C
18 D
19 A
20 B
21 C
22 D
23 A
24 B
25 C
VB.NetMockTest III
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?
A - Shadows
B - Shared
C - Static
D - Unicode
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?
A - Widening
B - WithEvents
C - WriteOnly
D - ReadOnly
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?
A - Widening
B - WithEvents
C - WriteOnly
D - ReadOnly
Q 4 - Which of the following accesss modifier specifies that a property can be written but not read?
A - Widening
B - WithEvents
C - WriteOnly
D - ReadOnly
Q 5 - Which of the following statement declares and allocates storage space for one or more variables?
A - Dim
B - Const
C - Enum
D - Class
Q 6 - Which of the following statement declares and defines one or more constants?
A - Dim
B - Const
C - Enum
D - Class
Q 7 - Which of the following statement declares an enumeration and defines the values of its members?
A - Dim
B - Const
C - Enum
D - Class
Q 8 - Which of the following statement declares the name of a class and introduces the definition of the variables, properties, events, a nd
procedures that the class comprises?
A - Dim
B - Const
C - Enum
D - Class
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?
A - Structure
B - Module
C - Interface
D - Function
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?
A - Structure
B - Module
C - Interface
D - Function
Q 11 - Which of the following statement declares the name of an interface and introduces the definitions of the members that the int erface
comprises?
A - Structure
B - Module
C - Interface
D - Function
Q 12 - Which of the following statement declares the name, parameters, and code that define a Function procedure?
A - Structure
B - Module
C - Interface
D - Function
Q 13 - Which of the following statement declares the name, parameters, and code that define a Sub procedure?
A - Sub
B - Declare
C - Operator
D - Property
Q 14 - Which of the following statement declares a reference to a procedure implemented in an external file?
A - Sub
B - Declare
C - Operator
D - Property
Q 15 - Which of the following statement declares the operator symbol, operands, and code that define an operator procedure on a class or
structure?
A - Sub
B - Declare
C - Operator
D - Property
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?
A - Sub
B - Declare
C - Operator
D - Property
Q 17 - Which of the following statement declares a user-defined event?
A - Event
B - Delegate
C - Operator
D - Property
Q 18 - Which of the following statement is used to declare a delegate?
A - Event
B - Delegate
C - Operator
D - Property
Q 19 - Which of the following directive defines conditional compiler constants?
A - #Const
B - #ExternalSource
C - #If...Then...#Else
D - #Region
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?
A - #Const
B - #ExternalSource
C - #If...Then...#Else
D - #Region
Q 21 - Which of the following directive conditionally compiles selected blocks of Visual Basic code?
A - #Const
B - #ExternalSource
C - #If...Then...#Else
D - #Region
Q 22 - Which of the following directive helps in collapsing and hiding sections of code in Visual Basic files?
A - #Const
B - #ExternalSource
C - #If...Then...#Else
D - #Region
Q 23 - Which of the following operator returns the address of a procedure?
A - AddressOf
B - Await
C - GetType
D - Function Expression
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?
A - AddressOf
B - Await
C - GetType
D - Function Expression
Q 25 - Which of the following operator returns a Type object for the specified type?
A - AddressOf
B - Await
C - GetType
D - Function Expression
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
VB.Net Mock Test IV
Q 1 - Which of the following operator declares the parameters and code that define a function lambda expression?
A - AddressOf
B - Await
C - GetType
D - Function Expression
Q 2 - Which of the following operator uses short-circuit evaluation to conditionally return one of two values?
A - If
B - Await
C - GetType
D - Function Expression
Q 3 - Which of the following statement terminates the loop or select case statement and transfers execution to the statement
immediately following the loop or select case?
A - Exit
B - Continue
C - GoTo
D - None of the above.
Q 4 - Which of the following statement causes the loop to skip the remainder of its body and immediately retest its condition prior to
reiterating?
A - Exit
B - Continue
C - GoTo
D - None of the above.
Q 5 - Which of the following statement transfers control to the labeled statement?
A - Exit
B - Continue
C - GoTo
D - None of the above.
Q 6 - Which of the following property of Array class in VB.NET checks whether the Array has a fixed size?
A - IsFixedSize
B - IsStatic
C - Length
D - None of the above.
Q 7 - Which of the following property of Array class in VB.NET checks whether the Array is readonly?
A - IsFixedSize
B - IsReadOnly
C - Length
D - None of the above.
Q 8 - Which of the following property of Array class in VB.NET gets a 32-bit integer, the total number of elements in all the
dimensions of the Array?
A - Rank
B - LongLength
C - Length
D - None of the above.
Q 9 - Which of the following property of Array class in VB.NET gets a 64-bit integer, the total number of elements in all the
dimensions of the Array?
A - Rank
B - LongLength
C - Length
D - None of the above.
Q 10 - Which of the following property of Array class in VB.NET gets the rank (number of dimensions) of the Array?
A - Rank
B - LongLength
C - Length
D - None of the above.
Q 11 - Which of the following Collection class of VB.NET represents ordered collection of an object that can be indexed
individually?
A - ArrayList
B - Hashtable
C - SortedList
D - Stack
Q 12 - Which of the following Collection class of VB.NET uses a key to access the elements in the collection?
A - ArrayList
B - Hashtable
C - SortedList
D - Stack
Q 13 - Which of the following Collection class of VB.NET uses a key as well as an index to access the items in a list?
A - ArrayList
B - Hashtable
C - SortedList
D - Stack
Q 14 - Which of the following Collection class of VB.NET represents a last-in, first out collection of object?
A - ArrayList
B - Hashtable
C - SortedList
D - Stack
Q 15 - Which of the following Collection class of VB.NET represents a first-in, first out collection of object?
A - Queue
B - BitArray
C - SortedList
D - Stack
Q 16 - Which of the following Collection class of VB.NET represents an array of the binary representation using the values 1 and 0?
A - Queue
B - BitArray
C - SortedList
D - Stack
Q 17 - Which of the following block of VB.NET identifies a block of code for which particular exceptions will be activated?
A - Try
B - Catch
C - Finally
D - Throw
Q 18 - Which of the following block of VB.NET identifies a place to catch an exception with an exception handler at the place in a
program where you want to handle the problem?
A - Try
B - Catch
C - Finally
D - Throw
Q 19 - Which of the following block of VB.NET is used to execute a given set of statements, whether an exception is thrown or not
thrown?
A - Try
B - Catch
C - Finally
D - Throw
Q 20 - Which of the following keyword of VB.NET is used to throw an exception when a problem shows up?
A - Try
B - Catch
C - Finally
D - Throw
Q 21 - The finally block is used to execute a given set of statements, whether an exception is thrown or not thrown.
A - true
B - false
Q 22 - Which of the following is true about exceptions in VB.NET?
A - The exception classes in VB.NET are mainly directly or indirectly derived from the System.Exception class.
B - VB.NET exceptions are represented by classes.
C - Both of the above.
D - None of the above.
Q 23 - Which of the following is true about System.ApplicationException class in VB.NET?
A -The System.ApplicationException class supports exceptions generated by application programs.
B - Exceptions defined by the programmers should derive from this class.
C - Both of the above.
D - None of the above.
Q 24 - The System.SystemException class is the base class for all predefined system exception in VB.NET?
A - true
B - false
Q 25 - User-defined exception classes are derived from the ApplicationException class in VB.NET?
A - true
B - false
QuestionNumber AnswerKey
1 D
2 A
3 A
4 B
5 C
6 A
7 B
8 C
9 B
10 A
11 A
12 B
13 C
14 D
15 A
16 B
17 A
18 B
19 C
20 D
21 A
22 C
23 C
24 A
25 A

Vb.net

  • 1.
    VB.Net Quiz Q 1 -Which of the following is a basic data type in VB.NET? A - Boolean B - Byte C - Char D - All of the above. Answer : D Explanation All of the above are basic data types. Q 2 - Which of the following converts the expression to Decimal data type in VB.NET? A - CDbl(expression) B - CDec(expression) C - CInt(expression) D - CLng(expression) Answer : B Explanation CDec(expression) − Converts the expression to Decimal data type.
  • 2.
    Q 3 -Which of the following accesss modifier specifies that one or more declared programming elements are accessible from within the assembly that contains their declaration, not only by the component that declares them? A - ByRef B - ByVal C - Default D - Friend Answer : D Explanation Friend − Specifies that one or more declared programming elements are accessible from within the assembly that contains their declaration, not only by the component that declares them. Q 4 - Which of the following accesss modifier specifies that a property or procedure redeclares one or more existing properties or procedures with the same name? A - NotOverridable B - Optional C - Out D - Overloads Answer : D Explanation Overloads − Specifies that a property or procedure redeclares one or more existing properties or procedures with the same name. Q 5 - Which of the following accesss modifier allows you to pass an arbitrary number of arguments to the procedure?
  • 3.
    A - Overridable B- Overrides C - ParamArray D - Partial Answer : C Explanation ParamArray − ParamArray allows you to pass an arbitrary number of arguments to the procedure. A ParamArray parameter is always declared using ByVal. Q 6 - Which of the following statement declares and allocates storage space for one or more variables? A - Dim B - Const C - Enum D - Class Answer : A Explanation Dim − Declares and allocates storage space for one or more variables. Q 7 - 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? A - Sub B - Declare C - Operator
  • 4.
    D - Property Answer: D Explanation Property − Declares the name of a property, and the property procedures used to store and retrieve the value of the property. Q 8 - Which of the following operator uses short-circuit evaluation to conditionally return one of two values? A - If B - Await C - GetType D - Function Expression Answer : A Explanation If − It uses short-circuit evaluation to conditionally return one of two values. The If operator can be called with three arguments or with two arguments. Q 9 - Which of the following property of Array class in VB.NET checks whether the Array has a fixed size? A - IsFixedSize B - IsStatic C - Length D - None of the above.
  • 5.
    Answer : A Explanation IsFixedSizegets a value indicating whether the Array has a fixed size. Q 10 - Which of the following block of VB.NET identifies a block of code for which particular exceptions will be activated? A - Try B - Catch C - Finally D - Throw Answer : A Explanation Try − A Try block identifies a block of code for which particular exceptions will be activated. It's followed by one or more Catch blocks. VB.Net Mock Test I Q 1 - Which of the following is correct about VB.NET? A - Visual Basic .NET (VB.NET) is an object-oriented computer programming language implemented on the .NET Framework. B - It is not backwards-compatible with VB6, and any code written in the old version does not compile under VB.NET. C - Both of the above. D - None of the above. Q 2 - Which of the following is correct about VB.NET?
  • 6.
    A - VB.NEThas complete support for object-oriented concepts. VB.NET has complete support for object-oriented concepts. B - Everything in VB.NET is an object, including all of the primitive types (Short, Integer, Long, String, Boolean, etc.) and user- defined types, events, and even assemblies. C - All objects inherits from the base class Object. D - All of the above. Q 3 - Which of the following is an entry point method of VB.NET program? A - Sub Main B - function main C - Both of the above. D - None of the above. Q 4 - Which of the following is a basic data type in VB.NET? A - Boolean B - Byte C - Char D - All of the above. Q 5 - Which of the following is a true about Object in VB.NET? A - Object variable size is 4 bytes on 32-bit platform. B - Object variable size is 8 bytes on 64-bit platform. C - Any type can be stored in a variable of type Object. D - All of the above. Q 6 - Which of the following converts the expression to Boolean data type in VB.NET? A - CBool(expression)
  • 7.
    B - CByte(expression) C- CChar(expression) D - CDate(expression) Q 7 - Which of the following converts the expression to Byte data type in VB.NET? A - CBool(expression) B - CByte(expression) C - CChar(expression) D - CDate(expression) Q 8 - Which of the following converts the expression to Char data type in VB.NET? A - CBool(expression) B - CByte(expression) C - CChar(expression) D - CDate(expression) Q 9 - Which of the following converts the expression to Date data type in VB.NET? A - CBool(expression) B - CByte(expression) C - CChar(expression) D - CDate(expression) Q 10 - Which of the following converts the expression to Double data type in VB.NET? A - CDbl(expression) B - CDec(expression) C - CInt(expression)
  • 8.
    D - CLng(expression) Q11 - Which of the following converts the expression to Decimal data type in VB.NET? A - CDbl(expression) B - CDec(expression) C - CInt(expression) D - CLng(expression) Q 12 - Which of the following converts the expression to Integer data type in VB.NET? A - CDbl(expression) B - CDec(expression) C - CInt(expression) D - CLng(expression) Q 13 - Which of the following converts the expression to Long data type in VB.NET? A - CDbl(expression) B - CDec(expression) C - CInt(expression) D - CLng(expression) Q 14 - Which of the following converts the expression to Object data type in VB.NET? A - CObj(expression) B - CSByte(expression) C - CShort(expression) D - CSng(expression) Q 15 - Which of the following converts the expression to SByte data type in VB.NET?
  • 9.
    A - CObj(expression) B- CSByte(expression) C - CShort(expression) D - CSng(expression) Q 16 - Which of the following converts the expression to Short data type in VB.NET? A - CObj(expression) B - CSByte(expression) C - CShort(expression) D - CSng(expression) Q 17 - Which of the following converts the expression to Single data type in VB.NET? A - CObj(expression) B - CSByte(expression) C - CShort(expression) D - CSng(expression) Q 18 - Which of the following converts the expression to String data type in VB.NET? A - CStr(expression) B - CSByte(expression) C - CShort(expression) D - CSng(expression) Q 19 - Which of the following accesss modifier specifies that Visual Basic should marshal all strings to American National Standards Institute (ANSI) values regardless of the name of the external procedure being declared in VB.NET? A - Ansi
  • 10.
    B - Assembly C- Async D - Auto Q 20 - Which of the following accesss modifier specifies that an attribute at the beginning of a source file applies to the entire assembly? A - Ansi B - Assembly C - Async D - Auto Q 21 - Which of the following accesss modifier indicates that the method or lambda expression that it modifies is asynchronous? A - Ansi B - Assembly C - Async D - Auto Q 22 - Which of the following accesss modifier specifies that Visual Basic should marshal strings according to .NET Framework rules? A - Ansi B - Assembly C - Async D - Auto Q 23 - Which of the following accesss modifier specifies that an argument is passed by reference? A - ByRef B - ByVal
  • 11.
    C - Default D- Friend Q 24 - Which of the following is true about catch block in VB.NET? A - A program catches an exception with an exception handler at the place in a program where you want to handle the problem. B - The catch keyword indicates the catching of an exception. C - Both of the above. D - None of the above. Q 25 - Which of the following accesss modifier specifies that an argument is passed in such a way that the called procedure or property cannot change the value of a variable underlying the argument in the calling code? A - ByRef B - ByVal C - Default D - Friend QuestionNumber AnswerKey 1 C 2 D 3 A 4 D 5 D
  • 12.
    6 A 7 B 8C 9 D 10 A 11 B 12 C 13 D 14 A 15 B 16 C 17 D 18 A 19 A 20 B 21 C
  • 13.
    22 D 23 A 24C 25 B VB.Net Mock Test II Q 1 - Which of the following accesss modifier identifies a property as the default property of its class, structure, or interface? A - ByRef B - ByVal C - Default D - Friend Q 2 - Which of the following accesss modifier specifies that one or more declared programming elements are accessible from within the assembly that contains their declaration, not only by the component that declares them? A - ByRef B - ByVal C - Default D - Friend Q 3 - Which of the following accesss modifier is used in generic interfaces and delegates? A - In B - Iterator C - Key D - Module
  • 14.
    Q 4 -Which of the following accesss modifier specifies that a function or Get accessor is an iterator? A - In B - Iterator C - Key D - Module Q 5 - Which of the following accesss modifier enables you to specify behavior for properties of anonymous types? A - In B - Iterator C - Key D - Module Q 6 - Which of the following accesss modifier specifies that an attribute at the beginning of a source file applies to the current assembly module? A - In B - Iterator C - Key D - Module Q 7 - Which of the following accesss modifier specifies that a class can be used only as a base class and that you cannot create an object directly from it? A - MustInherit B - MustOverride C - Narrowing D - NotInheritable Q 8 - Which of the following accesss modifier specifies that a property or procedure is not implemented in this class and must be overridden in a derived class before it can be used? A - MustInherit
  • 15.
    B - MustOverride C- Narrowing D - NotInheritable Q 9 - Which of the following accesss modifier indicates that a conversion operator (CType) converts a class or structure to a type that might not be able to hold some of the possible values of the original class or structure? A - MustInherit B - MustOverride C - Narrowing D - NotInheritable Q 10 - Which of the following accesss modifier specifies that a class cannot be used as a base class? A - MustInherit B - MustOverride C - Narrowing D - NotInheritable Q 11 - Which of the following accesss modifier specifies that a property or procedure cannot be overridden in a derived class? A - NotOverridable B - Optional C - Out D - Overloads Q 12 - Which of the following accesss modifier specifies that a procedure argument can be omitted when the procedure is called? A - NotOverridable B - Optional C - Out D - Overloads Q 13 - Which of the following accesss modifier specifies that the type is covariant?
  • 16.
    A - NotOverridable B- Optional C - Out D - Overloads Q 14 - Which of the following accesss modifier specifies that a property or procedure redeclares one or more existing properties or procedures with the same name? A - NotOverridable B - Optional C - Out D - Overloads Q 15 - Which of the following accesss modifier specifies that a property or procedure can be overridden by an identically named prop erty or procedure in a derived class? A - Overridable B - Overrides C - ParamArray D - Partial Q 16 - Which of the following accesss modifier specifies that a property or procedure overrides an identically named property or procedure inherited from a base class? A - Overridable B - Overrides C - ParamArray D - Partial Q 17 - Which of the following accesss modifier allows you to pass an arbitrary number of arguments to the procedure? A - Overridable B - Overrides
  • 17.
    C - ParamArray D- Partial Q 18 - Which of the following accesss modifier indicates that a class or structure declaration is a partial definition of the class or structure? A - Overridable B - Overrides C - ParamArray D - Partial Q 19 - Which of the following accesss modifier specifies that one or more declared programming elements are accessible only from within their declaration context, including from within any contained types? A - Private B - Protected C - Public D - ReadOnly Q 20 - Which of the following accesss modifier specifies that one or more declared programming elements are accessible only from within their own class or from a derived class? A - Private B - Protected C - Public D - ReadOnly Q 21 - Which of the following accesss modifier specifies that one or more declared programming elements have no access restrictions? A - Private B - Protected C - Public D - ReadOnly Q 22 - Which of the following accesss modifier specifies that a variable or property can be read but not written?
  • 18.
    A - Private B- Protected C - Public D - ReadOnly Q 23 - Which of the following accesss modifier specifies that a declared programming element redeclares and hides an identically named element, or set of overloaded elements, in a base class? A - Shadows B - Shared C - Static D - Unicode Q 24 - Which of the following accesss modifier specifies that one or more declared programming elements are associated with a class or structure at large, and not with a specific instance of the class or structure? A - Shadows B - Shared C - Static D - Unicode Q 25 - Which of the following accesss modifier specifies that one or more declared local variables are to continue to exist and retain their latest values after termination of the procedure in which they are declared? A - Shadows B - Shared C - Static D - Unicode Question Number Answer Key
  • 19.
    1 C 2 D 3A 4 B 5 C 6 D 7 A 8 B 9 C 10 D 11 A 12 B 13 C 14 D 15 A 16 B
  • 20.
    17 C 18 D 19A 20 B 21 C 22 D 23 A 24 B 25 C VB.NetMockTest III 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? A - Shadows B - Shared C - Static D - Unicode 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? A - Widening
  • 21.
    B - WithEvents C- WriteOnly D - ReadOnly 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? A - Widening B - WithEvents C - WriteOnly D - ReadOnly Q 4 - Which of the following accesss modifier specifies that a property can be written but not read? A - Widening B - WithEvents C - WriteOnly D - ReadOnly Q 5 - Which of the following statement declares and allocates storage space for one or more variables? A - Dim B - Const C - Enum D - Class Q 6 - Which of the following statement declares and defines one or more constants? A - Dim B - Const C - Enum D - Class Q 7 - Which of the following statement declares an enumeration and defines the values of its members?
  • 22.
    A - Dim B- Const C - Enum D - Class Q 8 - Which of the following statement declares the name of a class and introduces the definition of the variables, properties, events, a nd procedures that the class comprises? A - Dim B - Const C - Enum D - Class 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? A - Structure B - Module C - Interface D - Function 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? A - Structure B - Module C - Interface D - Function Q 11 - Which of the following statement declares the name of an interface and introduces the definitions of the members that the int erface comprises? A - Structure B - Module
  • 23.
    C - Interface D- Function Q 12 - Which of the following statement declares the name, parameters, and code that define a Function procedure? A - Structure B - Module C - Interface D - Function Q 13 - Which of the following statement declares the name, parameters, and code that define a Sub procedure? A - Sub B - Declare C - Operator D - Property Q 14 - Which of the following statement declares a reference to a procedure implemented in an external file? A - Sub B - Declare C - Operator D - Property Q 15 - Which of the following statement declares the operator symbol, operands, and code that define an operator procedure on a class or structure? A - Sub B - Declare C - Operator D - Property 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?
  • 24.
    A - Sub B- Declare C - Operator D - Property Q 17 - Which of the following statement declares a user-defined event? A - Event B - Delegate C - Operator D - Property Q 18 - Which of the following statement is used to declare a delegate? A - Event B - Delegate C - Operator D - Property Q 19 - Which of the following directive defines conditional compiler constants? A - #Const B - #ExternalSource C - #If...Then...#Else D - #Region 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? A - #Const B - #ExternalSource C - #If...Then...#Else D - #Region
  • 25.
    Q 21 -Which of the following directive conditionally compiles selected blocks of Visual Basic code? A - #Const B - #ExternalSource C - #If...Then...#Else D - #Region Q 22 - Which of the following directive helps in collapsing and hiding sections of code in Visual Basic files? A - #Const B - #ExternalSource C - #If...Then...#Else D - #Region Q 23 - Which of the following operator returns the address of a procedure? A - AddressOf B - Await C - GetType D - Function Expression 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? A - AddressOf B - Await C - GetType D - Function Expression Q 25 - Which of the following operator returns a Type object for the specified type? A - AddressOf B - Await C - GetType
  • 26.
    D - FunctionExpression 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
  • 27.
    15 C 16 D 17A 18 B 19 A 20 B 21 C 22 D 23 A 24 B 25 C VB.Net Mock Test IV Q 1 - Which of the following operator declares the parameters and code that define a function lambda expression? A - AddressOf B - Await C - GetType D - Function Expression
  • 28.
    Q 2 -Which of the following operator uses short-circuit evaluation to conditionally return one of two values? A - If B - Await C - GetType D - Function Expression Q 3 - Which of the following statement terminates the loop or select case statement and transfers execution to the statement immediately following the loop or select case? A - Exit B - Continue C - GoTo D - None of the above. Q 4 - Which of the following statement causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating? A - Exit B - Continue C - GoTo D - None of the above. Q 5 - Which of the following statement transfers control to the labeled statement? A - Exit B - Continue C - GoTo D - None of the above. Q 6 - Which of the following property of Array class in VB.NET checks whether the Array has a fixed size?
  • 29.
    A - IsFixedSize B- IsStatic C - Length D - None of the above. Q 7 - Which of the following property of Array class in VB.NET checks whether the Array is readonly? A - IsFixedSize B - IsReadOnly C - Length D - None of the above. Q 8 - Which of the following property of Array class in VB.NET gets a 32-bit integer, the total number of elements in all the dimensions of the Array? A - Rank B - LongLength C - Length D - None of the above. Q 9 - Which of the following property of Array class in VB.NET gets a 64-bit integer, the total number of elements in all the dimensions of the Array? A - Rank B - LongLength C - Length D - None of the above. Q 10 - Which of the following property of Array class in VB.NET gets the rank (number of dimensions) of the Array? A - Rank
  • 30.
    B - LongLength C- Length D - None of the above. Q 11 - Which of the following Collection class of VB.NET represents ordered collection of an object that can be indexed individually? A - ArrayList B - Hashtable C - SortedList D - Stack Q 12 - Which of the following Collection class of VB.NET uses a key to access the elements in the collection? A - ArrayList B - Hashtable C - SortedList D - Stack Q 13 - Which of the following Collection class of VB.NET uses a key as well as an index to access the items in a list? A - ArrayList B - Hashtable C - SortedList D - Stack Q 14 - Which of the following Collection class of VB.NET represents a last-in, first out collection of object? A - ArrayList B - Hashtable
  • 31.
    C - SortedList D- Stack Q 15 - Which of the following Collection class of VB.NET represents a first-in, first out collection of object? A - Queue B - BitArray C - SortedList D - Stack Q 16 - Which of the following Collection class of VB.NET represents an array of the binary representation using the values 1 and 0? A - Queue B - BitArray C - SortedList D - Stack Q 17 - Which of the following block of VB.NET identifies a block of code for which particular exceptions will be activated? A - Try B - Catch C - Finally D - Throw Q 18 - Which of the following block of VB.NET identifies a place to catch an exception with an exception handler at the place in a program where you want to handle the problem? A - Try B - Catch C - Finally
  • 32.
    D - Throw Q19 - Which of the following block of VB.NET is used to execute a given set of statements, whether an exception is thrown or not thrown? A - Try B - Catch C - Finally D - Throw Q 20 - Which of the following keyword of VB.NET is used to throw an exception when a problem shows up? A - Try B - Catch C - Finally D - Throw Q 21 - The finally block is used to execute a given set of statements, whether an exception is thrown or not thrown. A - true B - false Q 22 - Which of the following is true about exceptions in VB.NET? A - The exception classes in VB.NET are mainly directly or indirectly derived from the System.Exception class. B - VB.NET exceptions are represented by classes. C - Both of the above. D - None of the above. Q 23 - Which of the following is true about System.ApplicationException class in VB.NET? A -The System.ApplicationException class supports exceptions generated by application programs.
  • 33.
    B - Exceptionsdefined by the programmers should derive from this class. C - Both of the above. D - None of the above. Q 24 - The System.SystemException class is the base class for all predefined system exception in VB.NET? A - true B - false Q 25 - User-defined exception classes are derived from the ApplicationException class in VB.NET? A - true B - false QuestionNumber AnswerKey 1 D 2 A 3 A 4 B 5 C 6 A 7 B 8 C
  • 34.
    9 B 10 A 11A 12 B 13 C 14 D 15 A 16 B 17 A 18 B 19 C 20 D 21 A 22 C 23 C 24 A
  • 35.