Today I Learned: It is valid C to declare the types of a function's arguments after the function definition.

Not just valid, but this is how defining a function is described in K&R's The C Programming Language!

@samathy omg let's not encourage people to use k&r notation!!! 🙃

When I was picking up c in highschool, my teacher still taught both variants, and it was incredibly confusing as to why he would always point to k&r as an aside. I figure he imagined that we'd have to read legacy code some day in our careers. Little did he know that software developers would prefer to reinvent the wheel thanks to the "made here first" mentality ;)

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!

We adhere to an adapted version of the TootCat Code of Conduct and follow the Toot Café list of blocked instances. Ash is the admin and is supported by Fuzzface and Brian! as moderators.

Hosting costs are largely covered by our generous supporters on Patreon – thanks for all the help!