This section presents you various set of Mock Tests related to VBScript Framework. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Q 1 - Which of the following function of VBScript converts a given number of any variant subtype to Single?
CSng function converts a given number of any variant subtype to Single.
Q 2 - Which of the following function of VBScript converts a given number of any variant subtype to Hexadecimal?
Hex function converts a given number of any variant subtype to Hexadecimal.
Q 3 - How will you format a number upto 3 decimal places in VBScript?
A - Using FormatNumber Function
Using FormatNumber function, which would return an expression formatted as a number.
Q 4 - How will you format a number in percetage format in VBScript?
A - Using FormatNumber Function
Using FormatPercent function, which would return an expression formatted as a percent.
Q 5 - How will you get the integer part of a number in VBScript?
A - Using FormatNumber Function
Using Int function, which returns the integer part of the given number.
Q 6 - How will you get the natural logarithm of the given number in VBScript?
A - Using FormatNumber Function
Using Log function, which returns the natural logarithm of the given number.
Q 7 - How will you get the octal value of the given number in VBScript?
Using Oct function, which returns the octal value of the given number.
Q 8 - How will you get the hexadecimal value of the given number in VBScript?
Using Hex function, which returns the hexadecimal value of the given number.
Q 9 - How will you get a random number between 0 and 1 in VBScript?
Using Rnd function,which returns a random number between 0 and 1.
Q 10 - How will you get the square root of the given number in VBScript?
Using Sqr function, which returns the square root of the given number.
Q 11 - How will you get the absolute value of the given number in VBScript?
Using Abs function, which returns the absolute value of the given number.
Q 12 - How will you get the exponent of the given number in VBScript?
Using Exp function, which returns the value of e raised to the specified number.
Q 13 - How will you get the first occurrence of one string within another string using VBScript?
Using InStr function, which returns the first occurrence of one string within another string. The search happens from left to right.
Q 14 - How will you get the last occurrence of one string within another string using VBScript?
Using InStrRev function, which returns the first occurrence of one string within another string. The search happens from right to left.
Q 15 - How will you convert a string to lower case string using VBScript?
Using Lcase function, which returns the lower case of the specified string.
Q 16 - How will you convert a string to upper case string using VBScript?
Using Ucase function, which returns the upper case of the specified string.
Q 17 - How will you trim the spaces on the left of a string using VBScript?
Using Ltrim function, which returns a string after removing the spaces on the left side of the specified string.
Q 18 - How will you trim the spaces on the right of a string using VBScript?
Using Rtrim function, which returns a string after removing the spaces on the right side of the specified string.
Q 19 - How will you trim the leading as well as trailing spaces of a string using VBScript?
Using Trim function, which returns a string value after removing both leading and trailing blank spaces.
Q 20 - How will you get length of a string using VBScript?
Using Len function, which returns the length of the given string.
Q 21 - How will you replace a string with another string using VBScript?
Using Replace function, which returns a string after replacing a string with another string.
Q 22 - How will you fill the string with the specified number of spaces using VBScript?
Using Space function, which fills a string with the specified number of spaces.
Q 23 - How will you compare two strings in VBScript?
Using StrComp function, which returns an integer value after comparing the two specified strings.
Q 24 - What StrComp(String1, String2) returns if String1 is less than String2 in lexicographical order?
StrComp(String1, String2) returns -1 if String1 is less than String2 in lexicographical order.
Q 25 - What StrComp(String1, String2) returns if String1 is same as String2?
StrComp(String1, String2) returns 0 if String1 is same as String2.
Question Number | Answer Key |
---|---|
1 | D |
2 | A |
3 | A |
4 | B |
5 | C |
6 | D |
7 | A |
8 | B |
9 | C |
10 | D |
11 | A |
12 | B |
13 | C |
14 | D |
15 | A |
16 | B |
17 | C |
18 | D |
19 | A |
20 | B |
21 | C |
22 | D |
23 | A |
24 | A |
25 | B |