Write a program which perform arithmetic operation using pointer.
#include<iostream.h>
#include<conio.h>
void main()
{
int num[5]={56,75,22,18,90};
int ptr;
int i;
cout<<”array elements are::”;
for(i=0;i<5;i++)
ptr=num;
cout<<”value of ptr::”<<*ptr;
cout<<”\n”;
ptr++;
cout<<”value of ptr++::”<<*ptr;
cout<<”\n”;
ptr--;
cout<<”value of ptr--::”<<*ptr;
cout<<”\n”;
ptr=ptr+2;
cout<<”value of ptr+2::”<<*ptr;
cout<<”\n”;
ptr=ptr-1;
cout<<”value of ptr-1::”<<*ptr;
cout<<”\n”;
ptr+=3;
cout<<”value of ptr+=3::”<<*ptr;
cout<<”\n”;
getch();
}