To print pointer address using printf, we need to use %p format specifier.
#include<stdio.h> int main() { int a = 10; int *ptr = &a; printf("Address of a = %p\n",ptr); return 0; }
Address of a = 0x7ffeee203bb8