Question: CST - 2 1 0 Topic 1 Lab Question 3 ( Week 3 ) The purpose of this lab is to practice the following: Pointer

CST-210 Topic 1 Lab Question 3
(Week 3)
The purpose of this lab is to practice the following:
Pointer arithmetic and array manipulation.
Finish the following program by adding a loop that uses only the pointer variable arrPtr to print the elements in the array arr.
srand(time(NULL));
int arr[10];
arr[i]=rand()%20;
3
//print the array using the array name
for (int i=0;i10;i++)
std::printf("%d wi arr[i]);
}
std: : cout std:;endt;
//print the array using only the pointer arrptr
//HINT: look up pointer arithmetic
int* arrPtr;
 CST-210 Topic 1 Lab Question 3 (Week 3) The purpose of

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!