C Program to Read integers into an array and Reversing them using Pointers

Write a C program using pointers to read in an array of integers and print its elements in reverse order.

Output :

Program to read integers into an array and reversing them using pointers Explanation :

  1. We have declared one pointer variable and one array.

  1. Address of first element of array is stored inside pointer variable.

  1. Accept Size of an Array.

  1. Now we have accepted element one by one using for loop and scanf statement .

  1. Increment pointer variable so that it will then point to next element of array.
  2. After accepting all elements store address of last element inside pointer variable.

  1. Again using reverse for loop and printf statement print an array.