Consider the function definition and array declarations. Which are incorrect calls to the function make_2? Why?

(In considering this code, you are to ignore the a) b), and so on, at the start of the lines,
and consider that this code is to be embedded in a complete and correct program.)

```
void make_2 ( int a[], int size )
{
for (int i = 0; i < size; i++ )
a[i] = 2;
}
int array1[20];
```

a) ```
make_2( array, 30 );
```

b) ```
make_2( array, 10 );
>>>>>replace array with array1 two places
```

c) ```
"Hey, make_2, come change array1. Its size is 20."

//A declaration for parts e) through h).
int array2[50];
```

d) ```
make_2( array2, 50 );
```

e) ```
make_2( array2[5],50 );
```


b) ```
make_2( array, 10 );
>>>>>replace array with array1 two places
```

and

d) ```
make_2( array2, 50 );
```

a) the size argument is too large c) This is not a call to make_2, it is a string constant. e) nets a warning that an int has been passed to a pointer parameter without a cast.

Computer Science & Information Technology

You might also like to view...

What is the output of the following function call, given the function definition below?

cout << tester (4); // function call int tester (int n) // function definition { if (n == 1) return 3; else return 2 * tester ( n – 1); } a) 3 b) 6 c) 12 d) 24

Computer Science & Information Technology

Define Revolutionary Machines with a Simple Design.

What will be an ideal response?

Computer Science & Information Technology

________ uses a password to create a unique algorithm used to translate the saved Excel workbook into a stream of uninterpretable characters that can only be translated back using a password

A) Encryption B) A macro C) Cyphering D) A translator

Computer Science & Information Technology

Some parts of the operating system are resident; that is, these instructions remain on the hard disk until they are needed.

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

Computer Science & Information Technology