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

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


Constants are declared using 'const' keyword.

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

A - CDbl

B - CInt

C - CLng

D - CSng

Answer : C


CLng function converts a given number of any variant subtype to Long.

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


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

Q 5 - How will you trim the leading as well as trailing spaces of a string using VBScript?

A - Using Trim function

B - Using Len function

C - Using Replace function

D - Using Space function

Answer : A


Using Trim function, which returns a string value after removing both leading and trailing blank spaces.

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


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


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

Q 8 - Which of the following event is triggered when an object is instantiated in VBScript?

A - Class_Initialize

B - Class_Terminate

C - None of the above.

D - Both of the above.

Answer : A


Class_Initialize is triggered whenever you instantiate an object based on the class.

Answer : C


The date values should be enclosed within hash symbol.