Print the address or pointer for value in C

To print address in pointer to pointer:

printf("%p",emp1)

to dereference once and print the second address:

printf("%p",*emp1)

You can always verify with debugger, if you are on linux use ddd and display memory, or just plain gdb, you will see the memory address so you can compare with the values in your pointers.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)