how to print the address of a pointer in c

C
int a = 42;

printf("%p\n", (void *) &a);

Source

Also in C: