VB.Net Online Quiz



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

Answer : B

Explanation

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

Q 4 - 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 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 the name of a class and introduces the definition of the variables, properties, events, and procedures that the class comprises?

A - Dim

B - Const

C - Enum

D - Class

Answer : D

Explanation

Class − Declares the name of a class and introduces the definition of the variables, properties, events, and procedures that the class comprises.

Q 7 - Which of the following statement declares the name, parameters, and code that define a Sub procedure?

A - Sub

B - Declare

C - Operator

D - Property

Answer : A

Explanation

Sub − Declares the name, parameters, and code that define a Sub procedure.

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

Answer : B

Explanation

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

Answer : B

Explanation

BitArray − It represents an array of the binary representation using the values 1 and 0. It is used when you need to store the bits but do not know the number of bits in advance. You can access items from the BitArray collection by using an integer index, which starts from zero.

vb.net_questions_answers.htm
Advertisements