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 - Is it required to specify the type of variable during declaration in VBScript?

A - true

B - false

Answer : B

Explaination

No! Since there is only ONE fundamental data type, all the declared variables are variant by default.

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

A - EXP

B - ^

C - EXPONENT

D - None of the above.

Answer : B

Explaination

^ opeator is used to get the exponent of two numbers.

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

A - CDbl

B - CInt

C - CLng

D - CSng

Answer : C

Explaination

CLng function converts a given number of any variant subtype to Long.

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

A - Using Oct function

B - Using Hex function

C - Using Rnd function

D - Using Sqr function

Answer : A

Explaination

Using Oct function, which returns the octal value of the given number.

Q 5 - How will you trim the leading as well as trailing spaces of a string using VBScript?

A - Using Trim function

B - Using Len function

C - Using Replace function

D - Using Space function

Answer : A

Explaination

Using Trim function, which returns a string value after removing both leading and trailing blank spaces.

Q 6 - How will you get a combined string from array of string in VBScript?

A - Using Join function

B - Using Filter function

C - Using IsArray function

D - Using Erase Function

Answer : A

Explaination

Using Join function, which returns a String that contains a specified number of substrings in an array.

Q 7 - How will you check that a variable is an array in VBScript?

A - Using Join function

B - Using Filter function

C - Using IsArray function

D - Using Erase Function

Answer : C

Explaination

Using IsArray function, which returns a boolean value that indicates whether or not the input variable is an array.

Q 10 - What is the output of A + B in VBScript if A = "VB" and B = "Script"?

A - VBScript

B - Error

Answer : A

Explaination

+ operator concatenates two Values if values are string. So A + B will give VBScript.

vbscript_questions_answers.htm
Advertisements