print the array values in ascending order?

Answer Posted / rajanikanth

Option Explicit
Dim a,i,b,j,temp
a=Array(30,70,10,60,90,20,50,80)

For i=0 To UBound(a)

For j=0 To UBound(a)

If StrComp(a(i),a(j),1)<0 Then
temp=a(i)
a(i)=a(j)
a(j)=temp
End If
Next
Next
For i=0 To UBound(a)
MsgBox a(i)
Next

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain sga memory structures?

577


Explain the .wsf files?

531


Mention the rules for using option explicit statement?

482


why variable name should not exceed 255 characters?

1815


How to pass argument by reference to a function in vbscript?

536






What is the difference between a dictionary and an array?

577


How will you get the last occurrence of one string within another string using vbscript?

685


What are the different types of operators and their order of precedence?

566


What is the difference between for loop and while loop?

550


Explain the functionality of vbscript?

538


How can constants be declared in the vbscript language?

551


what is the differance between BYVAL,BYREF?

1766


1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?

3551


Explain the string concatenation function in vbscript?

538


Which event is triggered when mouse focus comes out of an element in the vbscript language?

509