Solved

Consider the Following Declarations of a Function That Receives an Array

Question 43

Multiple Choice

Consider the following declarations of a function that receives an array of integers and finds the element with the maximum value:
(i) findMax(int *vals, int numEls)
(ii) findMax(int vals[], int numEls)
The address in vals may be modified ____.


A) only if the function is declared as in (i)
B) only if the function is declared as in (ii)
C) if either (i) or (ii) is used
D) in neither case because an array variable cannot be modified (it is a pointer constant)

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents