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...

What Linux command do you use to change the name or location of a file?

What will be an ideal response?

Computer Science & Information Technology

HTML format is the most likely format to be allowed through a company's virus-filtering program.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Hold down ________ while clicking other controls to make adjustments to all of them at the same time

Fill in the blank(s) with correct word

Computer Science & Information Technology

If you attempt to delete a file or folder that does not exist, or if you try to delete a folder that is not empty, Ruby will ignore the error and substitute an empty file.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology