Code snippet archive?

a year ago by TruePe4rl to c/c_lang

I was just wondering if there are some really good websites to learn some tricks in C. As a not so beginner programmer I would really appreciate any kind of C snippet archive or something to find inspiration. I occasionally find some gold while watching Tsoding streams, but that experience is usually less dense in terms of fancy code and focuses more on problem solving.

MachineFab812 3 points a year ago

On the off-chance you haven't checked stackoverflow, C was much more popular in that site's heyday, and snippets were certainly something it was good for up until microsoft bought it.

path: 0 19577463, hotness: undefined, score: 3, children: 0
BlackRoseAmongThorns 2 points 8 months ago

If you're still interested, I've found tons of interesting techniques in open source projects, like CC and right now reading GLib source code, as I'm mostly interested in compile time guarantees and generic programming, I'd suggest starting with CC's source code.

path: 0 22320490, hotness: undefined, score: 2, children: 2
TruePe4rl 1 point 8 months ago

I am still interested and even found some new things. I completely agree with reading the source code to be the best way to learn.

Here are some other resources I'd consider worth mentioning over here also for anyone reading this in the future:

edit: fixed the links

path: 0 22320490 22322581, hotness: undefined, score: 1, children: 1
BlackRoseAmongThorns 2 points 8 months ago

If it means anything, i appreciate the links now :)

path: 0 22320490 22322581 22325920, hotness: undefined, score: 2, children: 0
c_lang
c_lang

@programming.dev

login for more options
1357
103
28

Welcome to the C community!

C is quirky, flawed, and an enormous success.
... When I read commentary about suggestions for where C should go, I often think back and give thanks that it wasn't developed under the advice of a worldwide crowd.
... The only way to learn a new programming language is by writing programs in it.

Ā© Dennis Ritchie

🌐 https://en.cppreference.com/w/c

go to feed...