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 operator is supported in VBScript?

A - Arithmetic Operators

B - Comparison Operators

C - Logical Operators

D - All of the above.

Answer : D


All of the above operators are supported in VBScript.

Q 3 - How will you format a number upto 3 decimal places in VBScript?

A - Using FormatNumber Function

B - Using FormatPercent function

C - Using Int function

D - Using Log function

Answer : A


Using FormatNumber function, which would return an expression formatted as a number.

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

A - Using Abs function

B - Using Exp function

C - Using InStr function

D - Using InStrRev function

Answer : A


Using Abs function, which returns the absolute value of the given number.

Q 5 - How will you replace a string with another string using VBScript?

A - Using Trim function

B - Using Len function

C - Using Replace function

D - Using Space function

Answer : C


Using Replace function, which returns a string after replacing a string with another string.

Q 6 - How will you split a string into an array in VBScript?

A - Using ReDim statement

B - Using LBound function

C - Using UBound function

D - Using Split function

Answer : D


Using Split function, which returns an array that contains a specified number of values. Split will be based on a Delimiter.

Q 7 - How will you check that a variable is an array in VBScript?

A - Using Join function

B - Using Filter function

C - Using IsArray function

D - Using Erase Function

Answer : C


Using IsArray function, which returns a boolean value that indicates whether or not the input variable is an array.

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


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


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