A pointer is a variable that stores the memory address of another variable instead of a direct value. Pointers help in efficient memory management and advanced programming.
#include <stdio.h>
int main() {
int a = 10;
int *p = &a;
printf("Value of a: %d\n", a);
printf("Address of a: %p\n", &a);
printf("Pointer value: %p\n", p);
printf("Value using pointer: %d\n", *p);
return 0;
}
int a = 5;
int *p = &a;
int **pp = &p;
printf("%d", **pp);