44.5k views
0 votes
A function that modifies an array by using pointer arithmetic such as ptr to process every value of the array should have a parameter that is: a. A nonconstant pointer to nonconstant data. b. A nonconstant pointer to constant data. c. A constant pointer to nonconstant data. d. A constant pointer to constant data.

User EMX
by
6.6k points

1 Answer

4 votes

Answer:

a. A nonconstant pointer to nonconstant data

Step-by-step explanation:

Pointer can be used to pass an argument by reference. Pointers may be assigned to any integer value. Functions parameters are passed by an array. The function which modifies an array by arithmetic pointer is nonconstant pointer to nonconstant data to process every value in array. Pointer arithmetic allows us to perform integer additions or subtractions for the operation in pointer.

User Abdelrahman Wahdan
by
6.8k points