#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int var=10;
int*a =&var;
cout<<"nilai var:"<<var<<endl;
cout<<"alamat var:"<<&var<<endl;
cout<<"isi pointer:"<<a<<endl;
cout<<"Nilai yang ditunjuk:"<<*a<<endl;
system("PAUSE");
return EXIT_SUCCESS;
}
Hasilnya:
Rabu, 15 Juni 2011
Langganan:
Posting Komentar (Atom)