Question: [ 1 0 ] Textbook, Ch . 2 , Exercise 6 . C program can access an array element by dereferencing a pointer ( e
Textbook, Ch Exercise C program can access an array element by dereferencing a pointer egp or using a subscript operation eg a For example,
int arr;
int ptr arr;
Both ptr and arr represent the array element, ie Rewrite the following function, and use pointers instead of an array subscript operator.
int sumint arr int
int sum ;
for ;
sum arr;
return sum;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
