Question: C Programming Write a main program to declare an integer array of size 3 and initialize it with 1, 2 and 3. Pass this array

C Programming

C Programming Write a main program to declare an integer array of

Write a main program to declare an integer array of size 3 and initialize it with 1, 2 and 3. Pass this array to a function called change. The function has two parameters one is the array and the other is the size of the array. The function should only use pointer notations and it should multiply each item of the array by 2 (using pointer notations). A second function called printArray should also accept two parameters one is the array and the other one is the size. This function should display the values of the array. Main program should test both functions. Also make sure to use the principle of least privilege for the printArray function

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!