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.

Answer : A

Explaination

document.cookie = 'key1 = value1; key2 = value2; expires = date'; is the correct option.

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

A - Using Abs function

B - Using Exp function

C - Using InStr function

D - Using InStrRev function

Answer : B

Explaination

Using Exp function, which returns the value of e raised to the specified number.

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 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.

Answer : B

Explaination

Using Filter function, returns a zero based array that contains a subset of a string array based on a specific filter criteria.

Q 8 - Which of the following statements destroys an object in VBScript?

A - delete obj

B - Set obj = Nothing

C - Both of the above.

D - None of the above.

Answer : B

Explaination

Set obj = Nothing destroys an object.

Answer : A

Explaination

The numeric values should be assigned without double quotes.

vbscript_questions_answers.htm
Advertisements