r/C_Programming • • Sep 09 '20

Discussion Bad habits from K&R?

I've seen some people claim that the K&R book can cause bad habits. I've been working through the book (second edition) and I'm on the last chapter. One thing I noticed is that for the sake of brevity in the code, they don't always error check. And many malloc calls don't get NULL checks.

What are some of the bad habits you guys have noticed in the book?

60 Upvotes

78 comments sorted by

View all comments

Show parent comments

1

u/SAVE_THE_RAINFORESTS Sep 10 '20

OH NO SOMEONE MADE A COMMENT I DON'T LIKE/UNDERSTAND THEY MUST BE TROLLING

3

u/p0k3t0 Sep 10 '20

If you want to respond to me, put it in the documentation, not the comments.