My new C programming book is slowly taking shape. If you want to learn along, let's start with the basics of control flow:
http://godbolt.org/z/3GerY3zEc
1/5
=> More informations about this toot | More toots from lcamtuf@infosec.exchange
From there, we can progress to function definitions and lexical scopes:
https://godbolt.org/z/GevPGhnYc
2/5
=> More informations about this toot | More toots from lcamtuf@infosec.exchange
Of course, no C tutorial is complete without an explanation of basic loops:
3/5
=> View attached media | View attached media
=> More informations about this toot | More toots from lcamtuf@infosec.exchange
It is also important to understand switch() statements:
https://godbolt.org/z/MqGb63x69
4/5
=> More informations about this toot | More toots from lcamtuf@infosec.exchange
But the most convenient feature of C is line numbering:
https://godbolt.org/z/dfsKGqYGz
5/5
=> More informations about this toot | More toots from lcamtuf@infosec.exchange
@lcamtuf The more I stare at this code, the more I think I actually hate you. I mean, in a good way, but still. 😉
=> More informations about this toot | More toots from tekhedd@byteheaven.net
@lcamtuf@infosec.exchange there is only one gif that can describe my reaction to this.
=> More informations about this toot | More toots from puppygirlhornypost2@transfem.social
@puppygirlhornypost2 @lcamtuf wait, this is intended to be confusing and worrisome? I thought this was originally a genuine approach to C programming :sobbing:
=> More informations about this toot | More toots from mondanzo@wolfdo.gg
@lcamtuf The second example is clear enough. But the first, uh, gcc's hand-crafted parser clowns the standard committee yet again.
💯 for "using" the function and avoiding the warning.
=> More informations about this toot | More toots from drahflow@infosec.exchange This content has been proxied by September (ba2dc).Proxy Information
text/gemini