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.

Questions and Answers

Answer : C

Explaination

Variables that are declared as 'Private' have scope only within that script in which they are declared. When declaring a variable of type 'Private', Dim keyword is replaced by 'Private'.

Answer : A

Explaination

The Public constants are available for all the scripts and procedures.

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

A - CDbl

B - CInt

C - CLng

D - CSng

Answer : A

Explaination

CDbl function converts a given number of any variant subtype to Double.

Q 4 - How will you get the hexadecimal value of the given number in VBScript?

A - Using Oct function

B - Using Hex function

C - Using Rnd function

D - Using Sqr function

Answer : B

Explaination

Using Hex function, which returns the hexadecimal value of the given number.

Q 5 - How will you trim the spaces on the right of a string using VBScript?

A - Using Lcase function

B - Using Ucase function

C - Using Ltrim function

D - Using Rtrim function

Answer : D

Explaination

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

Q 6 - How will you get a string with the specified character the specified number of times in VBScript?

A - Using Replace function

B - Using Compare function

C - Using InStr function

D - Using String function

Answer : D

Explaination

Using String function, which returns a String with a specified character the specified number of times.

Q 7 - How to pass argument by reference to a function in VBScript?

A - Using ByVal keyword

B - Using ByRef keyword

C - Both of the above.

D - None of the above.

Answer : B

Explaination

If ByRef is specified, then the arguments are sent as by reference when the function or procedure is called.

Answer : A

Explaination

The numeric values should be assigned without double quotes.

vbscript_questions_answers.htm
Advertisements