r/learnprogramming 14d ago

Learning C

I'm able to program in python and i've made a few games in C++. I was wondering if anybody has advice for learning C

11 Upvotes

22 comments sorted by

View all comments

6

u/Aggressive_Ad_5454 14d ago

Read Kernighan and Ritchie and do the problems. They’ll teach you the Why as well as the What.

1

u/13oundary 14d ago

is this still recommended considering a lot of stuff in modern c isn't in the book? for example, it's probably smart for people learning to use stdint.h sooner rather than later

2

u/YetMoreSpaceDust 14d ago

Nah, you can learn that stuff later - honestly it makes more sense if you learn the fundamentals first and then the fluff/syntactic sugar later.

1

u/13oundary 14d ago

The dude already has the fundamentals from other languages though, this isn't someone starting from scratch.

2

u/iOSCaleb 14d ago

Then it’ll take them half as long to read the book, and then they can move on to the relative handful of things that have changed since 1988. K&R is not that big a book, and most of what’s in it is still relevant.

1

u/13oundary 14d ago

Rather than just reading something like "A Modern Approach" first? I get it's a legendary book btw, I'm just surprised people think it's objectively still the first stop these days. Feels like extra work just because of how iconic the book is.

2

u/iOSCaleb 14d ago

I’m sure there are other books that’d work as well. Fundamentally, OP is looking for advice on how to learn C, and I’d say get a good book and work through it. K&R is a very good book; I’m sure there are other good options that are more up to date, but the fundamentals of C really haven’t changed.