This is a simple C program to show pointers and how you can use pointers to print address of variables and their contents.

This program prints the address of a variable, value of a variable, values of pointers.

Samsung 34' Odyssey G5 Ultra-Wide Gaming Monitor
Elevate your gaming and productivity with the Samsung 34-Inch Ultra-Wide Monitor – immersive visuals, seamless performance, and stunning clarity!
View on Amazon

 

Output from running this C program on my computer:
Address of x = 536869640, value of x = 1
Address of y = 536869632, value of y = 536869640, value of *y = 1
Address of a = 536869608, value of a = 9
Address of b = 536869600, value of b = 536869640, value of *b = 1