C examples for Pointer:Address
Checks to see where variables are stored with address operator
#include <stdio.h> void mikado(int); /* declare function */ int main(void) { int pooh = 2, bah = 5; /* local to main() */ /* ww w . j a va 2 s . com*/ printf("In main(), pooh = %d and &pooh = %p\n",pooh, &pooh); printf("In main(), bah = %d and &bah = %p\n", bah, &bah); mikado(pooh); return 0; } void mikado(int bah){ int pooh = 10; /* local to mikado() */ printf("pooh = %d and &pooh = %p\n", pooh, &pooh); printf("bah = %d and &bah = %p\n", bah, &bah); }