Syntax of function definition : Function Definition « Function « C Tutorial






The general format of a function is

<Return type>   <Function name>   <Parameter list>{
     local definitions;
     statements;
     Return value;
}
#include <stdio.h>

int f1 (int j, int f){
    int k;
    k = j + f;
    return k;
}

main(){
   int i=3;
   int j = 6;

   int k = f1(i,j);
  
   printf("%d",k);
}
9








8.2.Function Definition
8.2.1.Syntax of function definition