- 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
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
VBScript Mock Test
This section presents you various set of Mock Tests related to VBScript Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
VBScript Mock Test I
Q 1 - Which of the following is true about VBScript?
Answer : D
Explaination
All of the above options are correct.
Q 2 - Which of the following is true about VBScript?
A - VBScript is an object-based scripting language and NOT an Object-Oriented Programming language.
Answer : D
Explaination
All of the above options are correct.
Q 3 - Which of the following is true about variable naming conventions in VBScript?
A - Variable name must begin with an alphabet.
B - Variable names cannot exceed 255 characters.
Answer : D
Explaination
All of the above options are correct.
Q 4 - Which of the following keyword is used to declare a variable in VBScript?
Answer : C
Explaination
Variables are declared using 'dim' keyword.
Q 5 - 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 6 - Which of the following is a valid scope in VBScript?
Answer : D
Explaination
All of the above are valid scopes in VBScript.
Q 7 - In Which of the following scope, variables are available to all the procedures across all the associated scripts in VBScript?
Answer : B
Explaination
In Public scope, variables are available to all the procedures across all the associated scripts.
Q 8 - Which of the following is correct about variable declared using 'Dim' in VBScript?
Answer : C
Explaination
Variables declared using 'Dim' keyword at a Procedure level are available only within the same procedure. Variables declared using 'Dim' Keyword at script level are available to all the procedures within the same script.
Q 9 - 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 10 - Which of the following is correct about variable declared using 'Private' in VBScript?
B - When declaring a variable of type 'Private', Dim keyword is replaced by 'Private'.
Answer : C
Explaination
Variables that are declared as 'Private' have scope only within that script in which they are declared. When declaring a variable of type 'Private', Dim keyword is replaced by 'Private'.
Q 11 - Which of the following is used to create a constant in VBScript?
Answer : B
Explaination
Constants are declared using 'const' keyword.
Q 12 - What is the scope of a constant declared using Public in VBScript?
A - The Public constants are available for all the scripts and procedures.
B - The Public Constants are available within the procedure or Class.
Answer : A
Explaination
The Public constants are available for all the scripts and procedures.
Q 13 - What is the scope of a constant declared using Private in VBScript?
A - The Private constants are available for all the scripts and procedures.
B - The Private Constants are available within the procedure or Class.
Answer : B
Explaination
The Private Constants are available within the procedure or Class.
Q 14 - Which of the following operator is supported in VBScript?
Answer : D
Explaination
All of the above operators are supported in VBScript.
Q 15 - Which of the following operator can be used to get the modulus of two numbers in VBScript?
Answer : A
Explaination
MOD opeator is used to get the modulus of two numbers.
Q 16 - 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 17 - 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 18 - 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.
Answer : A
Explaination
+ operator adds two Values as Variable Values are Numeric. So A + B will give 15.
Answer : A
Explaination
Yes! VBScript can also manipulate cookies using the cookie property of the Document object.
Q 21 - Which of the following is true about cookie handling in VBScript?
A - VBScript can manipulate cookies using the cookie property of the Document object.
Answer : C
Explaination
Both of the above options are correct.
Q 22 - Which of the following is the correct syntax to create a cookie using VBScript?
A - document.cookie = 'key1 = value1; key2 = value2; expires = date';
B - browser.cookie = 'key1 = value1; key2 = value2; expires = date';
C - window.cookie = 'key1 = value1; key2 = value2; expires = date';
D - navigator.cookie = 'key1 = value1; key2 = value2; expires = date';
Answer : A
Explaination
document.cookie = 'key1 = value1; key2 = value2; expires = date'; is the correct option.
Q 23 - Which of the following function of VBScript converts a given number of any variant subtype to Double?
Answer : A
Explaination
CDbl function converts a given number of any variant subtype to Double.
Q 24 - Which of the following function of VBScript converts a given number of any variant subtype to Integer?
Answer : B
Explaination
CInt function converts a given number of any variant subtype to Integer.
Q 25 - 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.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | D |
2 | D |
3 | D |
4 | C |
5 | B |
6 | D |
7 | B |
8 | C |
9 | C |
10 | C |
11 | B |
12 | A |
13 | B |
14 | D |
15 | A |
16 | B |
17 | B |
18 | C |
19 | A |
20 | A |
21 | C |
22 | A |
23 | A |
24 | B |
25 | C |