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 - Can you access Cookie using VBScript?

A - true

B - false

Answer : A

Explaination

Yes! VBScript can also manipulate cookies using the cookie property of the Document object.

Q 3 - How will you format a number in percetage format in VBScript?

A - Using FormatNumber Function

B - Using FormatPercent function

C - Using Int function

D - Using Log function

Answer : B

Explaination

Using FormatPercent function, which would return an expression formatted as a percent.

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 spaces on the left of a string using VBScript?

A - Using Lcase function

B - Using Ucase function

C - Using Ltrim function

D - Using Rtrim function

Answer : C

Explaination

Using Ltrim function, which returns a string after removing the spaces on the left side of the specified string.

Q 6 - Which of the following is a correct way to assign a value to an array element in VBScript?

A - arr(0) = "VBScript"

B - arr[0] = "VBScript"

C - arr.set(0,"VBScript")

D - None of the above.

Answer : A

Explaination

arr(0) = "VBScript" is the correct way.

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 9 - Which of the following is used to throw an error in VBScript?

A - Err.raise

B - throw Err.

C - Both of the above.

D - None of the above.

Answer : A

Explaination

Use Err.Raise to throw an error.

Q 10 - What is the output of A & B in VBScript if A = 5 and B = 10?

A - 15

B - 510

Answer : B

Explaination

& operator concatenates two values. So A + B will give 510.

vbscript_questions_answers.htm
Advertisements