r/cprogramming • u/Delicious-Change7795 • Sep 12 '26
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.
15
Upvotes
View all comments
Show parent comment
1
u/Imaginary-Corner-653 Sep 12 '26 edited Sep 12 '26
I love this answer. It provides a simple concept to hang the idea behind pointers up on without being wrong or all that incomplete.
@OP
Maybe round this out with the basic understanding that, to a CPU (and even to some operating systems) any part of the CPU itself, any outside component connected to your motherboard and especially RAM / Harddisk, even resources connected via LAN - everything is accessed through a memory address (real or virtual).
So if you ever find yourself in need to read data from or write data to your gpu, your ram, your hardrive or even just to your processor parts you are going to require a way to address exactly where you want to point that action... Hence pointers.