#include <stdio.h> int main() { int age = 30; int *ptr = &age; // ptr stores the address of age printf("Value of age: %d\n", age); printf("Address of age: %p\n", &age); printf("Value via pointer: %d\n", *ptr); return 0; }
Click Run to execute this code.