how to print the address of a variable in c code example Example: how to print the address of a pointer in c int a = 42; printf("%p\n", (void *) &a);