Beej’s Guide to C Programming [pdf]
1–10 of 178 posts
Re: Beej’s Guide to C Programming [pdf]
#2Re: Beej’s Guide to C Programming [pdf]
#3Re: Beej’s Guide to C Programming [pdf]
#4Re: Beej’s Guide to C Programming [pdf]
#5Nice. But is there any like-this guide in Rust?
Re: Beej’s Guide to C Programming [pdf]
#6If you know how to walk down a street and stop at the right street number, then you have used pointers. And if you've ever observed that one tall building may "cover" a range of street numbers, such as 200-220, then you should understand how to move from one 4-byte "value" to the next in an array in memory.
Anyway, many more analogies... probably better than this one.
Maybe unions could make using pointers a bit more challenging, but again, tall buildings next to short buildings and so on. We do this kind of pointer calculation in real life.
Re: Beej’s Guide to C Programming [pdf]
#7Edit: poor grammar
Re: Beej’s Guide to C Programming [pdf]
#8I've enjoyed this guide a number of times but each time I hit a brick wall trying to understand pointers. I'm still keen to learn but it just doesnt 'click' for me... Edit: poor grammar
Re: Beej’s Guide to C Programming [pdf]
#9I've enjoyed this guide a number of times but each time I hit a brick wall trying to understand pointers. I'm still keen to learn but it just doesnt 'click' for me... Edit: poor grammar
Do you have any experience in other programming languages? How familiar are you with low-level computer architecture, at the CPU/memory level?
I guess one important part is to realize that in C, variables are basically names for memory locations, that in turn hold values. In other languages variables can be more abstract, and you have no idea how the value(s) are being associated with the variable name.
I started writing an example here, but I ran out of time and it wasn't good enough. :) Sorry.
EDIT: Now I've taken a loo at the relevant pages in the guide itself, and it seemed to explain the concepts very clearly and easily, so ... I'm not sure how to help. :)
Re: Beej’s Guide to C Programming [pdf]
#10I've enjoyed this guide a number of times but each time I hit a brick wall trying to understand pointers. I'm still keen to learn but it just doesnt 'click' for me... Edit: poor grammar