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 Byte data type in VB.NET?

A - CBool(expression)

B - CByte(expression)

C - CChar(expression)

D - CDate(expression)

Answer : B

Explanation

CByte(expression) − Converts the expression to Byte data type.

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

Answer : C

Explanation

CShort(expression) − Converts the expression to Short 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 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 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 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

Answer : B

Explanation

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

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

A - Structure

B - Module

C - Interface

D - Function

Answer : D

Explanation

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

Q 8 - Which of the following operator returns the address of a procedure?

A - AddressOf

B - Await

C - GetType

D - Function Expression

Answer : A

Explanation

AddressOf − Returns the address of a procedure.

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

Answer : C

Explanation

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

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_questions_answers.htm

Advertisements
E-Books Store