Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CST - 2 1 0 Topic 1 Lab Question 3 ( Week 3 ) The purpose of this lab is to practice the following: Pointer
CST Topic Lab Question
Week
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.
srandtimeNULL;
int arr;
arrrand;
print the array using the array name
for int ;;
std::printfd wi arri;
std: : cout std:;endt;
print the array using only the pointer arrptr
HINT: look up pointer arithmetic
int arrPtr;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started