VBScript Multiple choices


Total available count: 25
Subject - Scripting Languages
Subsubject - VBScript

Which function is used to get the largest subscript of an array in VBScript?


 

 

 

 



B


Solution:-

VBScript UBound Function
The UBound function returns the largest subscript for the indicated dimension of an array.

Tip: Use the UBound function with the LBound function to determine the size of an array.

VBScript UBound Function Syntax is as follows:
UBound(arrayname[,dimension])

arrayname:    arrayname is Required. The name of the array variable
dimension:    dimension is Optional. Which dimension's lower bound to return.
first dimension = 1, second dimension = 2, and so on. Default is always 1

VBScript UBound Function Example is depicted as follows:

<%

Courses=Array("HTML","HTML5","CSS","jQuery","JavaScript","SQL","Oracle","Java")
response.write(LBound(Courses) & "<br />")
response.write(UBound(Courses) & "<br />")

%>

The output of the above code will be as follows:

0
7




Next 5 multiple choice(s)

1

Which function is used to get the smallest subscript of an array in VBScript?

2

How will you create dynamic-array variables in VBScript?

3

Which function is used to compare two strings in VBScript?

4

Which function is used to reverse String in VBscript?

5

Pick Out the correct way of creating an array in VBscript?

Comments