![VBScript Tutorial](/vbscript/images/vbscript-mini-logo.jpg)
- VBScript Tutorial
- 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 Advanced
- 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.
![Questions and Answers](/images/questions_and_answers.png)
Q 1 - Which of the following keyword is used to declare a variable in VBScript?
Answer : C
Explaination
Variables are declared using 'dim' keyword.
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 convert a string to lower case string using VBScript?
Answer : A
Explaination
Using Lcase function, which returns the lower case of the specified string.
Q 5 - How will you compare two strings in VBScript?
Answer : A
Explaination
Using StrComp function, which returns an integer value after comparing the two specified strings.
Q 6 - Which of the following is a correct way to assign a value to an array element in VBScript?
Answer : A
Explaination
arr(0) = "VBScript" is the correct way.
Q 7 - How to pass argument by value to a function in VBScript?
Answer : A
Explaination
If ByVal is specified, then the arguments are sent as by value when the function or procedure is called.
Q 8 - Which of the following is correct about classes in VBScript?
A - By default, the variables in class are Public.
C - Property set, which assigns the new property value to the private object variable.
Answer : D
Explaination
All of the above options are correct.
Q 9 - Which of the following is correct about RegExp object?
Answer : D
Explaination
All of the above options are correct.
Q 10 - Which of the following is true about string value assignment in VBScript?
A - The string values should be assigned without double quotes.
B - The string values should be enclosed within doublequotes(").
C - The string values should be enclosed within hash symbol(#).
Answer : B
Explaination
The string values should be enclosed within doublequotes.