Question
3. Pointers Arrays: initializing content Using the pointer ptrArray, you now want to write values in those integers. Use a loop to go through each
3. Pointers Arrays: initializing content Using the pointer ptrArray, you now want to write values in those integers. Use a loop to go through each element in that array, and initialize them all to 42. This is done in the main. 4. Pointers Arrays: printing Write a function that will print the elements in the array-pointer. The function should accept a pointer to an integer, and the size of this array. The function should not return anything. Here is your function prototype: void printArray(int* ptr, int nb); Your function needs to use a loop to go through all the elements in the array, and simply prints them on a new line. In the main function, call this function with your pointer ptrArray and the size given by the user.
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