A function statement can return a value to its caller. It does so from within its function block. The caller is not required to use the returned value and can ignore it. In Hello, world!, the printf() function call actually does return a value but we ignore it.
When a function statement is specified with a return type, then it must return a value of that type. Such a specification consists of two parts:
- The return type of the function, given before the name of the function
- The return value, which is of the same type as the return type
In main.c, int—short for integer or whole number—is the type specified that the main()function must return to its caller. Immediately before the closing brace, we find thereturn 0;statement, which returns the 0integer value. In most OS system calls (such as Unix, Linux, macOS, and Windows), a return value of 0 by convention typically means no error...