92.8k views
5 votes
Look at the following array definition:

const int numbers[SIZE] = { 18, 17, 12, 14 };
Suppose we want to pass the array to the function processArray in the following manner:

processArray(numbers, SIZE);
Which of the following function headers is the correct one for the processArray function?

a. void processArray(const int *arr, int size)
b. void processArray(int * const arr, int size)

1 Answer

1 vote

Answer:

The answer is void process Array (int arr {}, int n)

Step-by-step explanation:

Solution

From the given question, the right choice answer i not listed here.

However this is the right answer choice stated as follows: void process Array (int arr {}, int n)

The size of this array is not fixed. we need to pass or move the array as the second argument to the function.

The option a and b is wrong.

User Coneybeare
by
3.5k points