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

A - CDbl(expression)

B - CDec(expression)

C - CInt(expression)

D - CLng(expression)

Answer : D

Explanation

CLng(expression) − Converts the expression to Long data type.

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 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 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 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 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 Collection class of VB.NET represents ordered collection of an object that can be indexed individually?

A - ArrayList

B - Hashtable

C - SortedList

D - Stack

Answer : A

Explanation

ArrayList − It represents ordered collection of an object that can be indexed individually. It is basically an alternative to an array. However, unlike array, you can add and remove items from a list at a specified position using an index and the array resizes itself automatically. It also allows dynamic memory allocation, add, search and sort items in the list.

Q 10 - User-defined exception classes are derived from the ApplicationException class in VB.NET?

A - true

B - false

Answer : A

Explanation

User-defined exception classes are derived from the ApplicationException class.

vb.net_questions_answers.htm
Advertisements