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 2 - Which of the following operator can be used to do an XOR operation in VBScript?

A - ~

B - ^

C - XOR

D - None of the above.

Answer : C

Explaination

XOR is used to do an XOR operation.

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

A - CDbl

B - CInt

C - CLng

D - CSng

Answer : D

Explaination

CSng function converts a given number of any variant subtype to Single.

Q 4 - How will you get the last occurrence of one string within another string using VBScript?

A - Using Abs function

B - Using Exp function

C - Using InStr function

D - Using InStrRev function

Answer : D

Explaination

Using InStrRev function, which returns the first occurrence of one string within another string. The search happens from right to left.

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 increase the size of an array in VBScript?

A - Using ReDim statement

B - Using LBound function

C - Using UBound function

D - Using Split function

Answer : A

Explaination

Using ReDim statement, we can declare dynamic-array variables and allocate or reallocate storage space.

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.

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