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 : D

Explaination

All of the above options are correct.

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 square root of the given number in VBScript?

A - Using Oct function

B - Using Hex function

C - Using Rnd function

D - Using Sqr function

Answer : D

Explaination

Using Sqr function, which returns the square root of the given number.

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 - Which of the following is a correct way to declare array in VBScript?

A - Dim arr1()

B - Dim arr2(5)

C - Dim arr3 = Array("apple","Orange","Grapes")

D - All of the above.

Answer : D

Explaination

All of the above options are correct.

Answer : A

Explaination

To invoke a function in the script, you would simple need to write the name of that function with the Call keyword.

Q 10 - Which of the following is used to clear error in VBScript?

A - Err.Clear

B - Err.Delete

C - Both of the above.

D - None of the above.

Answer : A

Explaination

Err.Clear clear an error.

vbscript_questions_answers.htm
Advertisements