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.

Answer : B

Explaination

The Private Constants are available within the procedure or Class.

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 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 - What StrComp(String1, String2) returns if String1 is less than String2 in lexicographical order?

A - -1

B - 0

C - 1

D - None of the above.

Answer : A

Explaination

StrComp(String1, String2) returns -1 if String1 is less than String2 in lexicographical order.

Q 6 - What StrComp(String1, String2) returns if String1 is greater than String2 in lexicographical order?

A - -1

B - 0

C - 1

D - None of the above.

Answer : C

Explaination

StrComp(String1, String2) returns 1 if String1 is greater than String2 in lexicographical order.

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 : B

Explaination

The string values should be enclosed within doublequotes.


vbscript_questions_answers.htm

Advertisements