Which of the following techniques can be used to modify the actual variable passed to a
Which of the following techniques can be used to modify the actual variable passed to a
function?
Show answerHide answer
Correct answer: (D) Pass the address of the actual parameters to function.
Explanation
C passes arguments by value, so to change the caller's variable you pass its address (a pointer) and modify it through *ptr inside the function.