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 true about VBScript?
All of the above options are correct.
Q 2 - 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 3 - 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 4 - How will you get the octal value of the given number in VBScript?
Using Oct function, which returns the octal value of the given number.
Q 5 - What StrComp(String1, String2) returns if String1 is same as String2?
StrComp(String1, String2) returns 0 if String1 is same as String2.
Q 6 - Which of the following is a correct way to assign a value to an array element in VBScript?
arr(0) = "VBScript" is the correct way.
Q 7 - How to pass argument by value to a function in VBScript?
If ByVal is specified, then the arguments are sent as by value when the function or procedure is called.
Q 8 - Which of the following statements destroys an object in VBScript?
Set obj = Nothing destroys an object.
Q 9 - What is the purpose of TextStream object of Scripting.FileSystemObject class in VBScript?
A - TextStream provides a list of all the folders within a Folder.
B - TextStream enables developers to read and write text files.
C - TextStream provides a list of all files contained within a folder.
TextStream enables developers to read and write text files.
Q 10 - Which of the following is used to clear error in VBScript?
Err.Clear clear an error.