VB.Net Mock Test


Advertisements

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.

Questions and Answers

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

Answer : C

Explanation

Default − Identifies a property as the default property of its class, structure, or interface.

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

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 3 - Which of the following accesss modifier is used in generic interfaces and delegates?

A - In

B - Iterator

C - Key

D - Module

Answer : A

Explanation

In − It is used in generic interfaces and delegates.

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

Answer : B

Explanation

Iterator − Specifies that a function or Get accessor is an iterator. An iterator performs a custom iteration over a collection.

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

Answer : C

Explanation

Key − The Key keyword enables you to specify behavior for properties of anonymous types.

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

Answer : D

Explanation

Module − Specifies that an attribute at the beginning of a source file applies to the current assembly module. It is not same as the Module statement.

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

Answer : A

Explanation

MustInherit − Specifies that a class can be used only as a base class and that you cannot create an object directly from it.

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

Answer : B

Explanation

MustOverride − 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.

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

Answer : C

Explanation

Narrowing − 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.

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

Answer : D

Explanation

NotInheritable − Specifies that a class cannot be used as a base class.

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

Answer : A

Explanation

NotOverridable − Specifies that a property or procedure cannot be overridden in a derived class.

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

Answer : B

Explanation

Optional − Specifies that a procedure argument can be omitted when the procedure is called.

Q 13 - Which of the following accesss modifier specifies that the type is covariant?

A - NotOverridable

B - Optional

C - Out

D - Overloads

Answer : C

Explanation

Out − For generic type parameters, the Out keyword specifies that the type is covariant.

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

Answer : D

Explanation

Overloads − Specifies that a property or procedure redeclares one or more existing properties or procedures with the same name.

Q 15 - Which of the following accesss modifier specifies that a property or procedure can be overridden by an identically named property or procedure in a derived class?

A - Overridable

B - Overrides

C - ParamArray

D - Partial

Answer : A

Explanation

Overridable − Specifies that a property or procedure can be overridden by an identically named property or procedure in a derived class.

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

Answer : B

Explanation

Overrides − Specifies that a property or procedure overrides an identically named property or procedure inherited from a base class.

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

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 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

Answer : D

Explanation

Partial − Indicates that a class or structure declaration is a partial definition of the class or structure.

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

Answer : A

Explanation

Private − Specifies that one or more declared programming elements are accessible only from within their declaration context, including from within any contained types.

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

Answer : B

Explanation

Protected − Specifies that one or more declared programming elements are accessible only from within their own class or from a derived class.

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

Answer : C

Explanation

Public − Specifies that one or more declared programming elements have no access restrictions.

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

Answer : D

Explanation

ReadOnly − Specifies that a variable or property can be read but not written.

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

Answer : A

Explanation

Shadows − Specifies that a declared programming element redeclares and hides an identically named element, or set of overloaded elements, in a base class.

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

Answer : B

Explanation

Shared − 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.

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

Answer : C

Explanation

Static − 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.

Answer Sheet

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.net_questions_answers.htm
Advertisements