- 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.
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 get the modulus of two numbers in VBScript?
Answer : A
Explaination
MOD opeator is used to get the modulus of two numbers.
Q 3 - How will you get the integer part of a number in VBScript?
A - Using FormatNumber Function
Answer : C
Explaination
Using Int function, which returns the integer part of the given number.
Q 4 - How will you get the last occurrence of one string within another string using VBScript?
Answer : D
Explaination
Using InStrRev function, which returns the first occurrence of one string within another string. The search happens from right to left.
Q 5 - How will you convert a string to upper case string using VBScript?
Answer : B
Explaination
Using Ucase function, which returns the upper case of the specified string.
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 - Which of the following statements creates an object in VBScript?
A - Set obj = CreateObject("Scripting.Dictionary")
Answer : A
Explaination
Set obj = CreateObject("Scripting.Dictionary") creates an object.
Q 8 - Which of the following event is triggered when an object goes out of scope or when the object is set to Nothing in VBScript?
Answer : B
Explaination
Class_Terminate is triggered when an object goes out of scope or when the object is set to Nothing.
Q 9 - What is the purpose of Folders object of Scripting.FileSystemObject class in VBScript?
A - Folders provides a list of all the folders within a Folder.
B - Folders contains methods and properties that allow developers to create, delete or move a file.
C - Folders provides a list of all files contained within a folder.
D - Folders provides methods and properties that allow developers to create, delete or move folders.
Answer : A
Explaination
Folders provides a list of all the folders within a Folder.
Answer : B
Explaination
No! VBScript is a case-insensitive language. This means that language keywords, variables, function names and any other identifiers need NOT be typed with a consistent capitalization of letters.
To Continue Learning Please Login
Login with Google