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

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 Single?

A - CDbl

B - CInt

C - CLng

D - CSng

Answer : D

Explaination

CSng function converts a given number of any variant subtype to Single.

Q 4 - How will you get the first occurrence of one string within another string using VBScript?

A - Using Abs function

B - Using Exp function

C - Using InStr function

D - Using InStrRev function

Answer : C

Explaination

Using InStr function, which returns the first occurrence of one string within another string. The search happens from left to right.

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

A - Using Lcase function

B - Using Ucase function

C - Using Ltrim function

D - Using Rtrim function

Answer : C

Explaination

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

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.

Answer : B

Explaination

To return a value from a function, simply assign the value to the function name itself.

Answer : C

Explaination

The time values should be enclosed within hash symbol.


vbscript_questions_answers.htm

Advertisements