4 ms·
Thanks to everybody for the suggestions. I made some changes to denote addressof and better explain arrays. Also stated that the explicit cast wasn't needed.
by denniskubes 14y ago
Thanks to everybody for the suggestions. I made some changes to denote addressof and better explain arrays. Also stated that the explicit cast wasn't needed.
- greenyoda 14y agoA couple more things: - There's nothing special about uninitialized pointers in C. Any uninitialized variable, whether it's a pointer, int, double, etc., contains unpredictable bytes left over from whatever was previously in that memory location, and should not be referenced. Not sure why this belongs in an article that's specifically about pointers. - You should proofread the whole thing and fix the typos that a spelling checker won't pick up, e.g., "garage" should be "garbage".
- acqq 14y agoExactly, as soon as I saw "pointers can be null or uninitialized" my thought was "this is a really confused soul who wants to teach others." I made my own compilers for living but I find the text very confusing. I'm glad I didn't have to learn anything from this text. I still believe people should learn C from this book: http://en.wikipedia.org/wiki/The_C_Programming_Language http://en.wikipedia.org/wiki/The_C_Programming_Language It's not so big and it's really good written.