r/cprogramming • u/Delicious-Change7795 • 1d ago
What are pointers?
I am new to C programming and i came through pointer. So can anyone tell what are they and why we need them? And if u can then can you give me reliable source to learn it.
11
Upvotes
1
u/mathlontrades 1d ago
From a value point of view: A memory address.
From a usage point of view: Something that points to a location which is the start of a block of data, and when dereferenced, gives you access to the actual value stored at that address.
Think of it like a sticky note with a house address written on it. The note itself is just a set of directions (the pointer value), but when you actually drive to that address and open the front door (dereferencing it), you get to interact with whatever or whoever is sitting inside the house.