What’s the best way to learn C after Python and C++?

0
6
Asked By MellowQuill42 On

I already know how to program in Python and have built a few small games in C++. I'd like to learn C properly and am looking for advice on what to study and what kinds of projects or exercises are most useful for building a solid foundation.

3 Answers

Answered By VividPanda63 On

The most effective approach is simply to write C regularly. Pick small problems or projects you actually care about and solve them in C instead of only reading tutorials. A beginner-friendly guide such as Beej’s Guide can give you structure while you practice.

Answered By NorthHarbor7 On

Focus on pointers, memory, arrays, and structs. Those are some of the biggest differences when coming from Python or C++, and understanding how data is laid out and accessed will take you a long way in C.

CedarFox18 -

Pointers finally clicked for me when I stopped treating them as weird syntax and started thinking of them as locations pointing to where the data lives. After that, the rest of C felt much less intimidating.

Answered By QuietOrbit29 On

Kernighan and Ritchie’s book is still a useful classic, especially if you work through the exercises instead of just reading it. It explains the reasoning behind the language as well as the syntax. That said, supplement it with modern C references, since the book doesn’t cover every newer practice or header, such as using stdint.h for fixed-width integer types.

MellowQuill42 -

Would you still recommend it as a main resource even though modern C has features and conventions that aren’t covered there?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.