Question: 1 . Trace through this code that modifies an array using pointers. 1 int values [ ] = { 2 , 3 , 5 }

1. Trace through this code that modifies an array using pointers.
1 int values[]={2,3,5};
2 int* p = values;
3 p++;
4*p =0;
2. Trace through this code that modifies an array using pointers.
1 int values[]={2,3,5}
2 int *p = values +1;
3*p =0;
4*(p +1)=1;
3. Trace through this code that modifies an array using pointers.
1 int values[]={2,3,5,8}
2 int* p = values;
3 int* q = values +3;
4 P++;
5 q--;
6*p =*q;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!