Pointer in c++

Example :
#include <iostream.h>
#include <conio.h>

void main(){
int a=35;
int *pa;
pa=&a;

cout<<"Nilai a : "<<a<<endl;
cout<<"Nilai pa : "<<*pa<<endl;

*pa=100;

cout<<"Nilai a: " <<a<<endl;
cout<<"Nilai pa: "<<*pa<<endl;

getch();

}
got it? hehe
Previous
Next Post »