C Programming Code Examples C > Pointers Code Examples C Program to Read integers into an array and Reversing them using Pointers 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. We have declared one pointer variable and one array. Address of first element of array is stored inside pointer variable. Accept Size of an Array. Now we have accepted element one by one using for loop and scanf statement . Increment pointer variable so that it will then point to next element of array. After accepting all elements store address of last element inside pointer variable. Again using reverse for loop and printf statement print an array. #include<stdio.h> #include<conio.h> #define MAX 30 void main() { int size, j, arr[MAX]; int *ptr; clrscr(); ptr = &arr[0]; printf("\nEnter the size of array : "); scanf("%d", &size); printf("\nEnter %d integers into array: ", size); for (j = 0; j < size; j++) { scanf("%d", ptr); ptr++; } ptr = &arr[size - 1]; printf("\nElements of array in reverse order are :"); for (j = size - 1; j >= 0; j--) { printf("\nElement%d is %d : ", j, *ptr); ptr--; } getch(); }