Definition of Function in C
May 15, 2021
A function definition, also known as function implementation shall include the following elements
1. function name;
3. list of parameters;
4. local variable declarations;
5. function statements; and
6. a return statement.
All the six elements are grouped two parts, namely,
♦ function header (First three elements);and
♦ function body (Second three elements).
A general format of a function definition to implement these two parts is given below
function_type function_name(parameter list)
{
local variable declaration;
executable statement1;
executable statement2;
. . . . .
. . . . .
return statement;
}
The first line function_type function_name(paramreter list) is known as the function header and the statements within the opening and closing braces constitute the function body, which is a compound statement.
For more details : Click here