A pointer is a variable that stores a memory address. A big chunk of C's power comes from understanding pointers and memory. You'll need pointers when you want to change a value from inside a function, handle arrays/strings efficiently, or work with dynamic memory.
c
#include <stdio.h>
int main() {
int age = 43;
int *ptr = &age;
printf("Address: %p
", (void *)ptr);
printf("Value: %d
", *ptr);
*ptr = 44;
printf("New age: %d", age);
return 0;
}ptr stores the address of age. *ptr reads or changes the value at the location the pointer points to.
You should see
Address: 0x7ffe5367e044 Value: 43 New age: 44Info
* can mean two different things depending on context: in a declaration it marks something as a pointer, while in an expression it dereferences one.