- 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 - Is it required to specify the type of variable during declaration in VBScript?
Answer : B
Explaination
No! Since there is only ONE fundamental data type, all the declared variables are variant by default.
Q 2 - Which of the following operator can be used to do an XOR operation in VBScript?
Answer : C
Explaination
XOR is used to do an XOR operation.
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 - How will you increase the size of an array in VBScript?
Answer : A
Explaination
Using ReDim statement, we can declare dynamic-array variables and allocate or reallocate storage space.
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 - What is the purpose of File object of Scripting.FileSystemObject class in VBScript?
B - File contains methods and properties that allow developers to create, delete or move a file.
C - File provides a list of all files contained within a folder.
D - File provides methods and properties that allow developers to create, delete or move folders.
Answer : B
Explaination
File contains methods and properties that allow developers to create, delete or move a file.
Q 9 - What is the purpose of RegExp object in VBScript?
A - RegExp object helps the developers to match the pattern of strings.
B - RegExp object provides methods to help us to work with Regular Expressions easily.
Answer : C
Explaination
Both of the above options are correct.
Q 10 - Which of the following is used to get error details in VBScript?
Answer : C
Explaination
Err.Number gives the error number and Err.Description gives error description.