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

A - CDbl(expression)

B - CDec(expression)

C - CInt(expression)

D - CLng(expression)

Answer : A

Explanation

CDbl(expression) − Converts the expression to Double data type.

Q 2 - Which of the following converts the expression to Object data type in VB.NET?

A - CObj(expression)

B - CSByte(expression)

C - CShort(expression)

D - CSng(expression)

Answer : A

Explanation

CObj(expression) − Converts the expression to Object data type.

Q 4 - 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 5 - 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 6 - Which of the following statement declares the name of a structure and introduces the definition of the variables, properties, events, and procedures that the structure comprises?

A - Structure

B - Module

C - Interface

D - Function

Answer : A

Explanation

Structure − Declares the name of a structure and introduces the definition of the variables, properties, events, and procedures that the structure 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 statement transfers control to the labeled statement?

A - Exit

B - Continue

C - GoTo

D - None of the above.

Answer : C

Explanation

GoTo − Transfers control to the labeled statement. Though it is not advised to use GoTo statement in your program.

Q 9 - Which of the following Collection class of VB.NET represents a first-in, first out collection of object?

A - Queue

B - BitArray

C - SortedList

D - Stack

Answer : A

Explanation

Queue − It represents a first-in, first out collection of object. It is used when you need a first-in, first-out access of items. When you add an item in the list, it is called enqueue, and when you remove an item, it is called deque.

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