#include<iostream.h>
#include<conio.h>
#define n 3
void main()
{
                int *ptr,i;
                clrscr();
                ptr=new int[n];
                for(i=0;i<n;i++)
                                {
                                cout<<"Enter The Value At "<<i+1<<" Position :- ";
                                cin>>*ptr;
                                ptr++;
                                }
                ptr-=n;
                for(i=0;i<n;i++)
                                {
                                cout<<"The Value At "<<i+1<<" Position = "<<*ptr<<endl;
                                ptr++;
                                }
                delete ptr;
                getch();
}

117.PNG

Advertisements