2023-10-22
Print address of variable:
#include <stdio.h> int main (void) { int i; printf ("i has address: %p\n", &i); }
Copy to clipboard
Compile with:
cc main.c
Execute program with:
./a.out
Output:
i has address: 0x7ffe6ac79df4
← Home