#include <iostream.h>and the other example :
#include <conio.h>
void main(){
int a=35;
int *pa,*qa;
pa=&a;
qa=pa;
cout<<"Value of a : "<<a<<endl;
cout<<"Address a : "<<&a<<endl;
cout<<"Value of *pa : "<<*pa<<endl;
cout<<"Value of pa : "<<pa<<endl;
cout<<"value of *qa : "<<*qa<<endl;
cout<<"Value of qa : "<<qa<<endl;
getch();
}
#include <iostream.h>and this is how to using pointer in an array structure :
#include <conio.h>
void main(){
int a=35;
int *pa;
pa=&a;
cout<<"Value of a : "<<a<<endl;
cout<<"Value of pa : "<<*pa<<endl;
*pa=100;
cout<<"Value of a: " <<a<<endl;
cout<<"Value of pa: "<<*pa<<endl;
getch();
}
#include <iostream.h>
#include <conio.h>
void main(){
int a[7]={17,68,99,56,45,65,78};
int *pa;
pa=a;
cout<<"pa : "<<*pa;
getch();
Sign up here with your email
ConversionConversion EmoticonEmoticon