DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
C language compilers

Function definitions

A function definition includes the body of the function after the declaration of the function. As with declarations, a function may be defined as a function prototype definition or defined in the old style. The function prototype style includes type declarations for each parameter in the parameter list. This example shows how main would be defined in each style:

   /* Function Prototype Style */       /* Old Style */
   

int int main(int argc, char *argv[]) main(argc, argv) { int argc; ... char *argv[]; } { ... }

Some important rules that govern function definitions:


Next topic: Conversions and expressions
Previous topic: Function declarators

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005