Log in

View Full Version : [ASK] Pointer C gan


Badguy13
20th November 2011, 08:57 AM
Code:

#include
#include

void main ()
{
int x;
int *px;
px=&x;
printf ("\n Variabel x ada di alamat : %p",px);
printf ("\nNilai variabel x diakses melalui pointer px : %d", *px);
x=10;
printf ("Nilai Variabel x diakses secara langsung : %d", x);
getch();
}

Hasil compile
Spoiler for Compile:




http://www.bayung.com/cccccc.png











nah, yang mau ane tanyain napa nilai variabel X diakses melalui pointer px napa nilainya jadi 19538340? napa gak 10 juga gan?

Ane bingung gan..

:((

</div>