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 - What is the output of A + B in VBScript if A = 5 and B = 10?

A - 15

B - 510

Answer : A

Explaination

+ operator adds two Values as Variable Values are Numeric. So A + B will give 15.

Q 3 - How will you format a number upto 3 decimal places in VBScript?

A - Using FormatNumber Function

B - Using FormatPercent function

C - Using Int function

D - Using Log function

Answer : A

Explaination

Using FormatNumber function, which would return an expression formatted as a number.

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 trim the spaces on the left of a string using VBScript?

A - Using Lcase function

B - Using Ucase function

C - Using Ltrim function

D - Using Rtrim function

Answer : C

Explaination

Using Ltrim function, which returns a string after removing the spaces on the left side of the specified string.

Answer : A

Explaination

Using StrReverse function, which returns a String after reversing the sequece of the characters of the given string.

Answer : B

Explaination

Using Filter function, returns a zero based array that contains a subset of a string array based on a specific filter criteria.

Q 8 - Which of the following statements destroys an object in VBScript?

A - delete obj

B - Set obj = Nothing

C - Both of the above.

D - None of the above.

Answer : B

Explaination

Set obj = Nothing destroys an object.

Q 10 - Which of the following is used to clear error in VBScript?

A - Err.Clear

B - Err.Delete

C - Both of the above.

D - None of the above.

Answer : A

Explaination

Err.Clear clear an error.


vbscript_questions_answers.htm

Advertisements