| | | | | |

Function Implementation

return_type name ( parameter_list )   // header
{                                     // body...                                                                                 
  // declare local variables                                                                                                    
  // do stuff                                                                                                                   
  // return a value of type return_type                                                                                         
}                                                                                                                               
  • Parameters must be named
  • Parameters of the function header are local variables for the function body
  • More local variables may be declared inside the function body
  • The function implementation may not be given more than one time in all the files that are part of the program

| | Top of Page | 3. Functions in C/C++ - 6 of 13