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

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'.

Q 2 - Which of the following operator can be used to get the modulus of two numbers in VBScript?

A - MOD

B - %

C - REMAINDER

D - None of the above.

Answer : A

Explaination

MOD opeator is used to get the modulus of two numbers.

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 convert a string to upper case string using VBScript?

A - Using Lcase function

B - Using Ucase function

C - Using Ltrim function

D - Using Rtrim function

Answer : B

Explaination

Using Ucase function, which returns the upper case of the specified string.

Q 6 - How will you split a string into an array in VBScript?

A - Using ReDim statement

B - Using LBound function

C - Using UBound function

D - Using Split function

Answer : D

Explaination

Using Split function, which returns an array that contains a specified number of values. Split will be based on a Delimiter.

Answer : A

Explaination

To invoke a function in the script, you would simple need to write the name of that function with the Call keyword.

Answer : B

Explaination

The string values should be enclosed within doublequotes.


vbscript_questions_answers.htm


Advertisements
E-Books Store