A return statement ends execution of the current function and transfers control to the statement that called it. In main, `return EXIT_SUCCESS;` sends an `int` value back to the platform startup routine. When printf returns, execution resumes in main where the call stopped. section 2.4.3
Returning from a function
A function with a non-void return type must provide an expression at each return point. For example: bool leapyear(unsigned year) { return !(year % 4) && ((year % 100) || !(year % 400)); } The returned expression is converted to the function's declared return type when necessary. A function declared `void` may use `return;` without an expression. section 7.1
Key rules:
- A function has one entry point but can contain several return statements. section 7.1
- Match every return with the function declaration: value-returning functions require expressions, while void functions must omit them. section 7.1
- Reaching the closing brace is equivalent to `return;` only for a void function; value-returning functions must not simply reach the end. section 7.1
Trace the calls from platform startup to main and printf, then follow each return to the point where execution resumes. section 2.4.3




