NOTE: The array elements can also be referred as arr[i],
Where ’i’ is the index of the respective element.
The same program 1 for reading and displaying dynamic array can also be written with pointer subtraction as follows:

To read the array and display the array using pointer subtraction operation, the address of the last element is stored in a pointer variable and it is update accordingly by subtracting the respective index of the element to be read or displayed.
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
main(),
{
int *arr, size, i,*p;
/* arr is a pointer to store address of dynamically allocated memory*/
clrscr();
printf(“Enter the size of array :”);
scanf(“%d”,&size);