Spring 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 keyword is used to declare a variable in VBScript?

A - variant

B - var

C - dim

D - None of the above.

Answer : C

Explaination

Variables are declared using 'dim' keyword.

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 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 a random number between 0 and 1 in VBScript?

A - Using Oct function

B - Using Hex function

C - Using Rnd function

D - Using Sqr function

Answer : C

Explaination

Using Rnd function,which returns a random number between 0 and 1.

Q 5 - How will you fill the string with the specified number of spaces using VBScript?

A - Using Trim function

B - Using Len function

C - Using Replace function

D - Using Space function

Answer : D

Explaination

Using Space function, which fills a string with the specified number of spaces.

Q 6 - How will you get the largest subscript of an array in VBScript?

A - Using ReDim statement

B - Using LBound function

C - Using UBound function

D - Using Split function

Answer : C

Explaination

Using UBound function, which returns an integer that corresponds to the largest subscript of the given arrays.

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

This class provides file system objects which help the developers to work with drives, folders and files.

Q 10 - What is the output of A & B in VBScript if A = 5 and B = 10?

A - 15

B - 510

Answer : B

Explaination

& operator concatenates two values. So A + B will give 510.


vbscript_questions_answers.htm

Advertisements