function to sort a list of integers in ascending order

What will be an ideal response?


```
void selectSort( int list[], int n)
{
int toFill, smallPos, pos, tmp;

for( toFill = 0; toFill < n-1; toFill++)
{
smallPos = toFill;
for( pos = toFill; pos < n; pos++)
{
if( list[pos] < list[smallPos])
smallPos = pos;
}

if( smallPos != toFill)
{
tmp = list[smallPos];
list[smallPos] = list[toFill];
list[toFill] = tmp;
}
}
}

```

Computer Science & Information Technology

You might also like to view...

To produce the current date, the ________ is used in Access which is equivalent to the TODAY function in Excel

Fill in the blank(s) with correct word

Computer Science & Information Technology

In the function =IF(E5

A) Value_if_true. B) Modifier. C) Logical_test. D) Value_if_false.

Computer Science & Information Technology

____________________ contain the layers and represent time.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

Item C in the accompanying figure shows options that are only available when which of the following is selected?

A. The On Release or Tap event B. The Secure PDF option C. The Preview option D. The Text Field type

Computer Science & Information Technology