This value is explicitly specified by the return statement, or it is 0 if no return statement is specified. However, a function cannot be the target of an assignment. These declarations are called function prototypes . In order to avoid this problem, you must declare the function. To declare a function, just copy the function header to the top of your program and add a semicolon at the end of it.
Variables defined in a function are local variables .
Their scope is limited to the function. Variables defined outside any function are global variables . Their scope is from the point they are defined down to the end of the file. It is better to use more local variables because global variables can be inadvertently overwritten. Usually, a local variable comes into existence when the function is entered and is destroyed upon exit.