VBScript Online Quiz


Following quiz provides Multiple Choice Questions (MCQs) related to VBScript Framework. 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

Answer : C

Explaination

Variables declared using 'Dim' keyword at a Procedure level are available only within the same procedure. Variables declared using 'Dim' Keyword at script level are available to all the procedures within the same script.

Q 2 - Which of the following is used to create a constant in VBScript?

A - constant

B - const

C - final

D - None of the above.

Answer : B

Explaination

Constants are declared using 'const' keyword.

Q 3 - Which of the following function of VBScript converts a given number of any variant subtype to Hexadecimal?

A - Hex

B - CInt

C - CLng

D - CSng

Answer : A

Explaination

Hex function converts a given number of any variant subtype to Hexadecimal.

Q 4 - How will you get the exponent of the given number in VBScript?

A - Using Abs function

B - Using Exp function

C - Using InStr function

D - Using InStrRev function

Answer : B

Explaination

Using Exp function, which returns the value of e raised to the specified number.

Answer : A

Explaination

Using StrComp function, which returns an integer value after comparing the two specified strings.

Q 6 - How will you get the largest subscript of an array in VBScript?

A - Using ReDim statement

B - Using LBound function

C - Using UBound function

D - Using Split function

Answer : C

Explaination

Using UBound function, which returns an integer that corresponds to the largest subscript of the given arrays.

Q 7 - How will you release the memory acquired by an array variable in VBScript?

A - Using Join function

B - Using Filter function

C - Using IsArray function

D - Using Erase Function

Answer : D

Explaination

Using Erase Function, which recovers the allocated memory for the array variables.

Q 8 - Which of the following event is triggered when an object goes out of scope or when the object is set to Nothing in VBScript?

A - Class_Initialize

B - Class_Terminate

C - None of the above.

D - Both of the above.

Answer : B

Explaination

Class_Terminate is triggered when an object goes out of scope or when the object is set to Nothing.

Q 10 - What is the output of A + B in VBScript if A = "VB" and B = "Script"?

A - VBScript

B - Error

Answer : A

Explaination

+ operator concatenates two Values if values are string. So A + B will give VBScript.

vbscript_questions_answers.htm
Advertisements