VBScript Online Quiz


Advertisements

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 2 - Which of the following operator can be used to check if two numbers are equal or not in VBScript?

A - !=

B - <>

C - not

D - None of the above.

Answer : B

Explaination

<> operator is used to check if two numbers are equal or not.

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

A - CDbl

B - CInt

C - CLng

D - CSng

Answer : C

Explaination

CLng function converts a given number of any variant subtype to Long.

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

A - Using Abs function

B - Using Exp function

C - Using InStr function

D - Using InStrRev function

Answer : A

Explaination

Using Abs function, which returns the absolute value of the given number.

Q 5 - How will you fill the string with the specified number of spaces using VBScript?

A - Using Trim function

B - Using Len function

C - Using Replace function

D - Using Space function

Answer : D

Explaination

Using Space function, which fills a string with the specified number of spaces.

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 10 - What is the output of A & B in VBScript if A = "VB" and B = "Script"?

A - VBScript

B - Error

Answer : A

Explaination

& operator concatenates two values. So A & B will give VBScript.

vbscript_questions_answers.htm
Advertisements