Consider the following function definition:

```
void tripler(int& n)
{
n = 3*n;
}
```

Given this definition, which of the following are acceptable function calls?
int a[3] = {3,4,5}, number = 2;

a) tripler(a[2]);
b) tripler(a[3]);
c) tripler(a[number]);
d) tripler(a);
e) tripler(number);

a) tripler(a[2]); c) tripler(a[number]); and d) tripler(a);

b) has an illegal index. d) passes the array itself, but the parameter is a call-by-reference to an int, not an array of anything.

Computer Science & Information Technology

You might also like to view...

Describe how sort order in an Access table is determined

What will be an ideal response?

Computer Science & Information Technology

A ________ is a miniature, semitransparent toolbar that is used to work with objects on the screen

A) mini toolbar B) floating toolbar C) transparent toolbar D) navigation pane

Computer Science & Information Technology