Question: In this assignment, you will explore pointer arithme c and prac ce array manipula on using pointers in C + + . To this end,
In this assignment, you will explore pointer arithmec and pracce array manipulaon using pointers in
C To this end, you are required to do the following:
Declare an integer array of size and inialize it with arbitrary values.
Write a funcon called printArray that takes an integer pointer and the size of the array as
parameters and prints the elements of the array.
Write a funcon called incrementArray that takes an integer pointer and the size of the array as
parameters and increments each element of the array by
In the main funcon call the printArray funcon to print the inial values of the array.
Call the incrementArray funcon to increment the values of the array.
Call the printArray funcon again to print the modified values of the array.
Addional Requirements:
Use pointers to access and manipulate the elements of the array.
Demonstrate pointer arithmec to iterate through the array elements.
Provide comments to explain the purpose of each funcon and any complex operaons
Test your program with different array sizes and values.
Provide a screenshot that shows the tesng
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
