- VBScript - Home
- VBScript - Overview
- VBScript - Syntax
- VBScript - Enabling
- VBScript - Placement
- VBScript - Variables
- VBScript - Constants
- VBScript - Operators
- VBScript - Decisions
- VBScript - Loops
- VBScript - Events
- VBScript - Cookies
- VBScript - Numbers
- VBScript - Strings
- VBScript - Arrays
- VBScript - Date
- VBScript - Procedures
- VBScript - Dialog Boxes
- VBScript - Object Oriented
- VBScript - Reg Expressions
- VBScript - Error Handling
- VBScript - Misc Statements
- VBScript Useful Resources
- VBScript - Questions and Answers
- VBScript - Quick Guide
- VBScript - Useful Resources
- VBScript - Discussion
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.
Q 1 - Which of the following is a valid scope in VBScript?
Answer : D
Explaination
All of the above are valid scopes in VBScript.
Q 2 - Which of the following operator can be used to get the exponent of two numbers in VBScript?
Answer : B
Explaination
^ opeator is used to get the exponent of two numbers.
Q 3 - How will you format a number in percetage format in VBScript?
A - Using FormatNumber Function
Answer : B
Explaination
Using FormatPercent function, which would return an expression formatted as a percent.
Q 4 - How will you get the square root of the given number in VBScript?
Answer : D
Explaination
Using Sqr function, which returns the square root of the given number.
Q 5 - How will you trim the spaces on the right of a string using VBScript?
Answer : D
Explaination
Using Rtrim function, which returns a string after removing the spaces on the right side of the specified string.
Q 6 - What StrComp(String1, String2) returns if String1 is greater than String2 in lexicographical order?
Answer : C
Explaination
StrComp(String1, String2) returns 1 if String1 is greater than String2 in lexicographical order.
Q 7 - How to return a value from a function in VBScript?
Answer : B
Explaination
To return a value from a function, simply assign the value to the function name itself.
Q 8 - Which of the following statements destroys an object in VBScript?
Answer : B
Explaination
Set obj = Nothing destroys an object.
Q 9 - Which of the following is correct about RegExp.Replace method?
B - If there are no match then the original search-string is returned.
Answer : C
Explaination
Both of the above options are correct.
Q 10 - Which of the following is true about numeric value assignment in VBScript?
A - The numeric values should be assigned without double quotes.
B - The numeric values should be enclosed within doublequotes(").
C - The numeric values should be enclosed within hash symbol(#).
Answer : A
Explaination
The numeric values should be assigned without double quotes.