81. The proper operator precedence, from first to last, is:________
- a) logical, comparison, and arithmetic.
- b) Arithmetic, comparison, and logical.
- c) Arithmetic, logical, and comparison.
- d) Comparison, arithmetic, and logical.
Answer: B - Arithmetic operators (*, /, +, -) evaluate first, then comparison (>, <, =), then logical (AND, OR).
82. If no access modifier is specified for a class, it is considered ____________
- a) Public
- b) Private
- c) Friend
- d) Protected
Answer: A - In VB.NET, classes without explicit access modifiers default to Public accessibility.
83. Which does the solution explorer not display?
- a) Form Properties
- b) Reference Folder
- c) Form File
- d) Assemble File
Answer: A - Form properties are shown in the Properties Window, not Solution Explorer which shows project structure.
84. What is the scope of a constant declared using Private in VBScript?
- a) The Private constants are available for all the scripts and procedures.
- b) The Private Constants are available within the procedure or Class.
- c) Both of the above.
- d) None of the above.
Answer: B - Private constants in VBScript are accessible only within the procedure or class where they are declared.
85. Which browser has built-in support for executing VBScript?
- a) Internet Explorer
- b) Mozilla Firefox
- c) Opera
- d) None of these
Answer: A - Only Internet Explorer has native VBScript support; other browsers require plugins or don't support it.
86. Which of the following is true about numeric value assignment in VBScript?
- a) The numeric values should be assigned without double quotes.
- b) The numeric values should be enclosed within doublequotes(").
- c) The numeric values should be enclosed within hash symbol(#).
- d) None of the above.
Answer: A - Numeric values in VBScript are assigned without quotes; quotes would make them strings.
87. Which of the following operator is supported in VBScript?
- a) Arithmetic Operators
- b) Comparison Operators
- c) Logical Operators
- d) All of the above.
Answer: D - VBScript supports all three operator types: arithmetic, comparison, and logical operators.
88. What is the difference between the Sub procedure and Function procedure?
- a) Only the Sub procedure can perform actions.
- b) Both procedures can take arguments.
- c) Only the Function procedure can return a value.
- d) N.A.
Answer: C - Functions return values using their name; Subs perform actions but don't return values.
89. How will you get the exponent of the given number in VBScript?
- a) Using Abs function
- b) Using Exp function
- c) Using InStr function
- d) Using InStrRev function
Answer: B - Exp() returns e (the base of natural logarithms) raised to a power in VBScript.
90. How will you get the square root of the given number in VBScript?
- a) Using Oct function.
- b) Using Hex function.
- c) Using Rnd function.
- d) Using Sqr function.
Answer: D - Sqr() function calculates the square root of a number in VBScript.
91. How will you increase the size of an array in VBScript?
- a) Using ReDim statement.
- b) Using Split function.
- c) Using LBound function.
- d) Using UBound function
Answer: A - ReDim resizes arrays dynamically while optionally preserving existing values with Preserve keyword.
92. How to return a value from a function in VBScript?
- a) Using return keyword.
- b) Assign the value to the function name itself.
- c) Both of the above.
- d) None of the above.
Answer: B - VBScript functions return values by assigning to the function name: FunctionName = value.
93. How will you get the smallest subscript of an array in VBScript?
- a) Using ReDim statement.
- b) Using LBound function.
- c) Using UBound function.
- d) Using Split function.
Answer: B - LBound() returns the lowest available subscript (index) for an array dimension.
94. How will you format a number in percentage format in VBScript?
- a) Using FormatNumber Function.
- b) Using FormatPercent function.
- c) Using Int function.
- d) Using Log function.
Answer: B - FormatPercent() converts numbers to percentage format with % symbol in VBScript.
95. How will you get the integer part of a number in VBScript?
- a) Using FormatNumber Function.
- b) Using FormatPercent function.
- c) Using Int function.
- d) Using Log function.
Answer: C - Int() returns the integer portion by rounding down to the nearest integer.
96. How will you convert a string to lower case string using VBScript?
- a) Using Ucase function.
- b) Using Ucase function.
- c) Using Ltrim function.
- d) Using Rtrim function.
Answer: A - Wait, this appears to be a typo; LCase() converts to lowercase, but given options, UCase converts to uppercase.
97. 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 - LTrim() removes leading (left-side) spaces from a string in VBScript.
98. How will you get the largest subscript of an array in VBScript?
- a) Using ReDim statement.
- b) Using LBound function.
- c) Using UBound function.
- d) Using Split function.
Answer: C - UBound() returns the highest available subscript (index) for an array dimension.
99. How will you replace a string with another string using VBScript?
- a) Using Trim function.
- b) Using Len function.
- c) Using Replace function.
- d) Using Space function.
Answer: C - Replace() substitutes all occurrences of a substring with another string.
100. How will you reverse a String in VBScript?
- a) Using StrReverse function.
- b) Using Compare function.
- c) Using InStr function.
- d) Using toString function.
Answer: A - StrReverse() returns a string with the character order reversed in VBScript.