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.
Q 1 - Which of the following is true about VBScript?
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.
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.
All of the above options are correct.
Q 4 - Which of the following keyword is used to declare a variable in VBScript?
Variables are declared using 'dim' keyword.
Q 5 - Is it required to specify the type of variable during declaration in VBScript?
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?
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?
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?
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'.
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'.
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?
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.
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.
The Private Constants are available within the procedure or Class.
Q 14 - Which of the following operator is supported in VBScript?
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?
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?
^ 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?
<> 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?
XOR is used to do an XOR operation.
+ operator adds two Values as Variable Values are Numeric. So A + B will give 15.
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.
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';
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?
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?
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?
CLng function converts a given number of any variant subtype to Long.
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 |