Thursday 31 January 2013

pointer in c++ by Zafar Iqbal lavi

include<iostream.h>
#include<conio.h>
void main()
{

int n,m;
int*ptr;
int*ppp;
cout<<"enter two integers"<<endl;
cin>>n>>m;
    ptr=&n;
    ppp=&m;

cout<<"the value of n     "<<n<<endl;
cout<<"the address of n   "<<ptr<<endl;
cout<<endl<<endl<<endl<<endl;
cout<<"the value of m      "<<m<<endl;
cout<<"the address of m    "<<ppp;

getch();
}

0 comments:

Post a Comment