Question: ( a ) Given an integer array arr of size 1 0 , write a snippet that prints the array using pointer arithmetic. ( b

(a) Given an integer array arr of size 10, write a snippet that prints the array using pointer arithmetic.
(b) Explain what happens when you increment or decrement a pointer. Give an example with an integer pointer.
(c) Consider an array int arr[5]={10,20,30,40,50}; Write a function that reverses the array using pointers.
(d) Given a character array (aka a string) char s[]= "pointer";, use pointer arithmetic to convert the string to uppercase.

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 Programming Questions!