VB.Net Online Quiz


Advertisements


Following quiz provides Multiple Choice Questions (MCQs) related to VB.Net. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 1 - 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)

Answer : C

Explanation

CChar(expression) − Converts the expression to Char data type.

Q 2 - 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)

Answer : C

Explanation

CInt(expression) − Converts the expression to Integer data type.

Q 3 - 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 4 - 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 5 - 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.

Q 6 - Which of the following statement declares an enumeration and defines the values of its members?

A - Dim

B - Const

C - Enum

D - Class

Answer : C

Explanation

Enum − Declares an enumeration and defines the values of its members.

Q 7 - Which of the following statement declares a reference to a procedure implemented in an external file?

A - Sub

B - Declare

C - Operator

D - Property

Answer : B

Explanation

Declare − Declares a reference to a procedure implemented in an external file.

Q 8 - 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.

Answer : B

Explanation

Continue − Causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating.

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.

Answer : B

Explanation

LongLength gets a 64-bit integer that represents the total number of elements in all the dimensions of the Array.

Q 10 - The finally block is used to execute a given set of statements, whether an exception is thrown or not thrown.

A - true

B - false

Answer : A

Explanation

The finally block is used to execute a given set of statements, whether an exception is thrown or not thrown.


vb.net_questions_answers.htm

Advertisements