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 - In Which of the following scope, variables are available to all the procedures across all the associated scripts in VBScript?

A - Dim

B - Public

C - Private

D - All of the above.

Answer : B

Explaination

In Public scope, variables are available to all the procedures across all the associated scripts.

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 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 - How will you trim the leading as well as trailing spaces of a string using VBScript?

A - Using Trim function

B - Using Len function

C - Using Replace function

D - Using Space function

Answer : A

Explaination

Using Trim function, which returns a string value after removing both leading and trailing blank spaces.

Q 6 - How will you get the largest subscript of an array in VBScript?

A - Using ReDim statement

B - Using LBound function

C - Using UBound function

D - Using Split function

Answer : C

Explaination

Using UBound function, which returns an integer that corresponds to the largest subscript of the given arrays.

Q 7 - How to pass argument by value to a function in VBScript?

A - Using ByVal keyword

B - Using ByRef keyword

C - Both of the above.

D - None of the above.

Answer : A

Explaination

If ByVal is specified, then the arguments are sent as by value when the function or procedure is called.

Answer : A

Explaination

This class provides file system objects which help the developers to work with drives, folders and files.

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