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

Q 1 - Which of the following is a valid scope in VBScript?

A - Dim

B - Public

C - Private

D - All of the above.

Answer : D

Explaination

All of the above are valid scopes in VBScript.

Q 2 - Which of the following operator is supported in VBScript?

A - Arithmetic Operators

B - Comparison Operators

C - Logical Operators

D - All of the above.

Answer : D

Explaination

All of the above operators are supported in VBScript.

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

A - CDbl

B - CInt

C - CLng

D - CSng

Answer : B

Explaination

CInt function converts a given number of any variant subtype to Integer.

Q 4 - How will you get the natural logarithm of the given number in VBScript?

A - Using FormatNumber Function

B - Using FormatPercent function

C - Using Int function

D - Using Log function

Answer : D

Explaination

Using Log function, which returns the natural logarithm of the given number.

Q 5 - How will you replace a string with another string using VBScript?

A - Using Trim function

B - Using Len function

C - Using Replace function

D - Using Space function

Answer : C

Explaination

Using Replace function, which returns a string after replacing a string with another string.

Q 6 - Which of the following is a correct way to declare array in VBScript?

A - Dim arr1()

B - Dim arr2(5)

C - Dim arr3 = Array("apple","Orange","Grapes")

D - All of the above.

Answer : D

Explaination

All of the above options are correct.

Answer : A

Explaination

Set obj = CreateObject("Scripting.Dictionary") creates an object.

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.

Q 10 - Is VBScript case sensitive?

A - True

B - false

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.


vbscript_questions_answers.htm

Advertisements