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

Answer : D


All of the above options are correct.

Q 2 - Which of the following operator can be used to get the modulus of two numbers in VBScript?


B - %


D - None of the above.

Answer : A


MOD opeator is used to get the modulus of two numbers.

Q 3 - How will you format a number upto 3 decimal places in VBScript?

A - Using FormatNumber Function

B - Using FormatPercent function

C - Using Int function

D - Using Log function

Answer : A


Using FormatNumber function, which would return an expression formatted as a number.

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

A - Using Oct function

B - Using Hex function

C - Using Rnd function

D - Using Sqr function

Answer : B


Using Hex function, which returns the hexadecimal value of the given 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


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

Q 6 - How will you split a string into an array in VBScript?

A - Using ReDim statement

B - Using LBound function

C - Using UBound function

D - Using Split function

Answer : D


Using Split function, which returns an array that contains a specified number of values. Split will be based on a Delimiter.

Q 7 - Can in VBScript, function return multiple values?

A - True

B - False

Answer : A


Yes! A function can return multiple values separated by comma as an array assigned to the function name itself.

Answer : A


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

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

A - VBScript

B - Error

Answer : A


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