3 ms·
Late to this, & am not really a C programmer (longtime bash & java/scala etc, and studying Rust now), but for exemplary C I think of OpenBSD core utilities firs
by lcall 7y ago
Late to this, & am not really a C programmer (longtime bash & java/scala etc, and studying Rust now), but for exemplary C I think of OpenBSD core utilities first (ie, not ports & packages), given their ongoing auditing for security and correctness. The code can be browsed online, or installed as part of a basic system. I found it interesting to browse starting with some smaller utilities like echo and ls.
Resources:
https://cvsweb.openbsd.org/src/bin/ https://cvsweb.openbsd.org/src/bin/
https://cvsweb.openbsd.org/ https://cvsweb.openbsd.org/
https://github.com/openbsd https://github.com/openbsd
https://www.openbsd.org/anoncvs.html https://www.openbsd.org/anoncvs.html
https://www.openbsd.org/ https://www.openbsd.org/ (where I got the above links, on the left side under "Getting Source")
- lcall 7y ago(just to improve my previous accuracy where I mentioned scala & rust, though it's too late to edit: ...and C++ and many other things .)