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 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.

Answer : C

Explaination

Using Int function, which returns the integer part of the given number.

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

A - Using Oct function

B - Using Hex function

C - Using Rnd function

D - Using Sqr function

Answer : B

Explaination

Using Hex function, which returns the hexadecimal value of the given number.

Answer : A

Explaination

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

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.

Q 10 - What is the output of A & B in VBScript if A = 5 and B = 10?

A - 15

B - 510

Answer : B

Explaination

& operator concatenates two values. So A + B will give 510.

vbscript_questions_answers.htm
Advertisements