If array elements 0 through 4 of array a initially have the values 5, 3, 7 and 1, respectively, after executing the following code they will contain the values:

j = UBound( a)
While j >= 1
For i = 0 To j - 1
If a( i ).Price > a( i + 1).Price Then
Set o = a( i )
Set a( i ) = a( i + 1 )
Set a( i + 1 ) = o
Set o = Nothing
End If
Next
j = j – 1
Wend
(a) 5, 3, 7 and 1
(b) 7, 5, 3 and 1
(c) 1, 3, 5 and 7
(d) None of the above.

Ans: (c)

Business

You might also like to view...

List the five "triggers from which conflict may evolve within an organization

What will be an ideal response?

Business

SQL-invoked routines can be:

A) part of a DDL statement. B) functions or procedures. C) part of a DCL statement. D) contained within a CREATE statement.

Business