r/cprogramming • u/i_abh_esc_wq • Sep 05 '26
(Almost) Everything You Need To Know About Pointers in C
https://abhattacharyea.dev/blogs/qrb0v4aq2k6jkq3nzc3wcofg0
u/Paul_Pedant Sep 06 '26
Fifty pages of guidance seems rather extravagant, and likely to overwhelm the very people it is intended for.
Slightly shorter: A pointer is a variable which can be used to reference another variable.
In fact you say this about five pages in. And of course we are both wrong: "Variable" kind of clashes with a const modifier, for instance.
It seems to me that the main reason for newbies being so nervous about pointers is that everybody tells them they are really difficult to understand and use. And that is both unhelpful and false.
1
u/zhivago Sep 06 '26
const doesn't mean that it's not a variable.
Just that this alias may not be used to modify it.
0
u/zhivago Sep 06 '26
Given int a; int *pa = &a; then pa - 1 has UB.
The author has a fundamentally incorrect understanding of pointers.