Function Calls - C Function

C examples for Function:Function Definition

Description

Function Calls

Demo Code

#include <stdio.h> 

int addTwoNumbers(int, int);  //function prototype 

int main() { //ww  w  .  j  a  v a2  s.  c  o m
   int iResult; 
   iResult = addTwoNumbers(5, 5); //function call 
   
   printf("%d",iResult);
} 

//function definition 
int addTwoNumbers(int operand1, int operand2) { 
   return operand1 + operand2; 
}

Result


Related Tutorials