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 - What is the output of A + B in VBScript if A = 5 and B = 10?

A - 15

B - 510

Answer : A

Explaination

+ operator adds two Values as Variable Values are Numeric. So A + B will give 15.

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

Explaination

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

Q 4 - How will you get the natural logarithm of the given number in VBScript?

A - Using FormatNumber Function

B - Using FormatPercent function

C - Using Int function

D - Using Log function

Answer : D

Explaination

Using Log function, which returns the natural logarithm of the given number.

Q 5 - What StrComp(String1, String2) returns if String1 is less than String2 in lexicographical order?

A - -1

B - 0

C - 1

D - None of the above.

Answer : A

Explaination

StrComp(String1, String2) returns -1 if String1 is less than String2 in lexicographical order.

Q 6 - How will you get a string with the specified character the specified number of times in VBScript?

A - Using Replace function

B - Using Compare function

C - Using InStr function

D - Using String function

Answer : D

Explaination

Using String function, which returns a String with a specified character the specified number of times.

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

Explaination

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

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