Actions

EmSys

C - Function Definition

From EdWiki

Revision as of 09:30, 23 June 2015 by Jshankar (Talk | contribs) (1 revision imported: EdWiki -- Emsys pages from Shukra)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.