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 1 - Which of the following keyword is used to declare a variable in VBScript?

A - variant

B - var

C - dim

D - None of the above.

Answer : C

Explaination

Variables are declared using 'dim' keyword.

Q 2 - Which of the following operator can be used to get the exponent of two numbers in VBScript?

A - EXP

B - ^

C - EXPONENT

D - None of the above.

Answer : B

Explaination

^ opeator is used to get the exponent of two numbers.

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

A - CDbl

B - CInt

C - CLng

D - CSng

Answer : A

Explaination

CDbl function converts a given number of any variant subtype to Double.

Q 4 - How will you get the first occurrence of one string within another string using VBScript?

A - Using Abs function

B - Using Exp function

C - Using InStr function

D - Using InStrRev function

Answer : C

Explaination

Using InStr function, which returns the first occurrence of one string within another string. The search happens from left to right.

Q 5 - How will you trim the spaces on the right of a string using VBScript?

A - Using Lcase function

B - Using Ucase function

C - Using Ltrim function

D - Using Rtrim function

Answer : D

Explaination

Using Rtrim function, which returns a string after removing the spaces on the right side of the specified 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

Explaination

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 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 9 - Which of the following is used to capture a runtime Error in VBScript?

A - Err object.

B - Error object.

C - Both of the above.

D - None of the above.

Answer : A

Explaination

If we want to capture the error, then Err Object is used.

Answer : C

Explaination

The date values should be enclosed within hash symbol.

vbscript_questions_answers.htm
Advertisements