Function definitions implement the function prototype. - C Function

C examples for Function:Function Definition

Description

Function definitions implement the function prototype.

Demo Code

#include <stdio.h> 
int addTwoNumbers(int, int);  //function prototype 
int main() { /*from w ww  . j  a  v  a 2s  . co  m*/
   printf("%d",addTwoNumbers(2, 3) );
   return 0;
}
//function definition 
int addTwoNumbers(int operand1, int operand2){ 
   return operand1 + operand2; 
}

Result


Related Tutorials