Consider the declaration

```
double a[10] = {1.2, 2.1, 3.3, 3.5, 4.5, 7.9, 5.4,
8.7, 9.9, 1.0};
Write a function named out_of_order that will test this array for the condition
a[0] <= a[1] <= a[2] <=. . .
```

```
int out_of_order(double array[], int size)
{
for(int i=0; <; size-1; i++)
if (array[i] > array[i+1])
return i+1;
return -1;
```

Computer Science & Information Technology

You might also like to view...

The absolute value function abs is located in the _________ library.

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

Computer Science & Information Technology

Benefits that can be measured directly and assigned monetary value are known as ____?.

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

Computer Science & Information Technology