- 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 correct about variable declared using 'Public' in VBScript?
B - When declaring a variable of type 'public', Dim keyword is replaced by 'Public'.
Answer : C
Explaination
Variables declared using 'Public' Keyword are available to all the procedures across all the associated scripts. When declaring a variable of type 'public', Dim keyword is replaced by 'Public'.
Q 2 - Which of the following operator can be used to check if two numbers are equal or not in VBScript?
Answer : B
Explaination
<> operator is used to check if two numbers are equal or not.
Q 3 - Which of the following function of VBScript converts a given number of any variant subtype to Long?
Answer : C
Explaination
CLng function converts a given number of any variant subtype to Long.
Q 4 - How will you get the first occurrence of one string within another string using VBScript?
Answer : C
Explaination
Using InStr function, which returns the first occurrence of one string within another string. The search happens from left to right.
Q 5 - How will you trim the leading as well as trailing spaces of a string using VBScript?
Answer : A
Explaination
Using Trim function, which returns a string value after removing both leading and trailing blank spaces.
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 will you get a subset of a array in VBScript?
Answer : B
Explaination
Using Filter function, returns a zero based array that contains a subset of a string array based on a specific filter criteria.
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 used to throw an error in VBScript?
Answer : A
Explaination
Use Err.Raise to throw an error.
Answer : A
Explaination
+ operator concatenates two Values if values are string. So A + B will give VBScript.