Question: IN CODE C: Task 2 : Store arrays in a pointer ( 1 2 pt ) Similar to the previous task, we will do different

IN CODE C: Task 2: Store arrays in a pointer (12pt)
Similar to the previous task, we will do different copies but of an array.
Subtasks?
Create, in main, two arrays A and B of the same length and assign them any values.
Create four different pointers. PA, PB, P1, P2
"Store" the values of A and B in PAA and PB8, respectively.
1
Using only p1, make a copy of A is p1 and p2. The value store in p1 must always match with the value of x. The value store in p2 must have the value of x in the moment of the copy. Use a function
Create a function to update the value of A. The function must perform the next operation A+=B or A[i]=A[i]+B[i] where iin(0,1,2,dots,n-1). The argumenta for this functions are PA and PB
Create a function to print the values for A1PA,P1,P2.
Allowed functions
malloc
printi
 IN CODE C: Task 2: Store arrays in a pointer (12pt)

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 Databases Questions!