Pascal had an explicit distinction: functions are procedures which return a result.
K&R C didn't bother with procedures: everything is a function, and if you omit return at the end, it will return garbage to the caller 😂
Later, ANSI C added the "void" type and (optional) function prototypes, making this footgun somewhat less dangerous.
Support for declaring and defining functions without a full prototype will be finally removed in C23:
https://en.cppreference.com/w/c/23
Bobinas P4G is a social network. It runs on GNU social, version 2.0.1-beta0, available under the GNU Affero General Public License.
All Bobinas P4G content and data are available under the Creative Commons Attribution 3.0 license.