VBScript Online Quiz


Advertisements


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.

Questions and Answers

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 2 - Which of the following is used to create a constant in VBScript?

A - constant

B - const

C - final

D - None of the above.

Answer : B

Explaination

Constants are declared using 'const' keyword.

Q 3 - Which of the following function of VBScript converts a given number of any variant subtype to Hexadecimal?

A - Hex

B - CInt

C - CLng

D - CSng

Answer : A

Explaination

Hex function converts a given number of any variant subtype to Hexadecimal.

Q 4 - How will you convert a string to lower case string using VBScript?

A - Using Lcase function

B - Using Ucase function

C - Using Ltrim function

D - Using Rtrim function

Answer : A

Explaination

Using Lcase function, which returns the lower case of the specified string.

Q 5 - How will you convert a string to upper case string using VBScript?

A - Using Lcase function

B - Using Ucase function

C - Using Ltrim function

D - Using Rtrim function

Answer : B

Explaination

Using Ucase function, which returns the upper case of the specified string.

Q 6 - How will you increase the size of an array in VBScript?

A - Using ReDim statement

B - Using LBound function

C - Using UBound function

D - Using Split function

Answer : A

Explaination

Using ReDim statement, we can declare dynamic-array variables and allocate or reallocate storage space.

Q 7 - How will you check that a variable is an array in VBScript?

A - Using Join function

B - Using Filter function

C - Using IsArray function

D - Using Erase Function

Answer : C

Explaination

Using IsArray function, which returns a boolean value that indicates whether or not the input variable is an array.

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?

A - Class_Initialize

B - Class_Terminate

C - None of the above.

D - Both of the above.

Answer : B

Explaination

Class_Terminate is triggered when an object goes out of scope or when the object is set to Nothing.

Q 9 - Which of the following is used to throw an error in VBScript?

A - Err.raise

B - throw Err.

C - Both of the above.

D - None of the above.

Answer : A

Explaination

Use Err.Raise to throw an error.

Answer : C

Explaination

The date values should be enclosed within hash symbol.


vbscript_questions_answers.htm

Advertisements