Actions

EmSys

C - Function Definition

From EdWiki

Function Definition

  • This is where the actual implementation of the function takes place.
 return_type function_name(arg_type arg_name,)
{
    // implementation code goes here
 
    return expression;
}
  • The return statement is the mechanism for returning a value.
  • Declaration and definition of a function must match.
  • Definition of a function can occur only once, whereas declaration of a function can occur multiple times.