What value is returned by the following function?

```
int result (string a, int n)
{
int k = 0;
for (int i = 1; i < n; i++)
if (a[i] > a[k])
k = i;
return k;
} // end result
```

a. Index of the largest element in the first n elements in a.
b. Value of the largest element in the first n elements of a.
c. Index of the smallest element in the first n elements of a.
d. Value of the smallest element in the first n elements of a.
e. Number of elements in a.


a. Index of the largest element in the first n elements in a.

Computer Science & Information Technology

You might also like to view...

Which method can be used to convert a list to a tuple?

A. append B. tuple C. insert D. list

Computer Science & Information Technology

____ structures are attached end-to-end.

A. Stacking B. Selecting C. Connecting D. Building

Computer Science & Information Technology

To remove a blank paragraph from a document, you should:

A. Insert a new page B. Delete the paragraph marker C. Hold down CONTRL and press ENTER

Computer Science & Information Technology

A security analyst is reviewing firewall logs while investigating a compromised web server. The following ports appear in the log: 22, 25, 445, 1433, 3128, 3389, 6667 Which of the following protocols was used to access the server remotely?

A. LDAP B. HTTP C. RDP D. HTTPS

Computer Science & Information Technology