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 - Is it required to specify the type of variable during declaration in VBScript?

A - true

B - false

Answer : B

Explaination

No! Since there is only ONE fundamental data type, all the declared variables are variant by default.

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

Explaination

All of the above operators are supported in VBScript.

Answer : C

Explaination

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

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

A - Using Oct function

B - Using Hex function

C - Using Rnd function

D - Using Sqr function

Answer : A

Explaination

Using Oct function, which returns the octal value of the given number.

Q 5 - What StrComp(String1, String2) returns if String1 is same as String2?

A - -1

B - 0

C - 1

D - None of the above.

Answer : B

Explaination

StrComp(String1, String2) returns 0 if String1 is same as String2.

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

A - -1

B - 0

C - 1

D - None of the above.

Answer : C

Explaination

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

Q 7 - Can in VBScript, function return multiple values?

A - True

B - False

Answer : A

Explaination

Yes! A function can return multiple values separated by comma as an array assigned to the function name itself.

Answer : C

Explaination

The time values should be enclosed within hash symbol.

vbscript_questions_answers.htm
Advertisements