C examples for Function:Function Definition
Function prototypes should be placed outside the main() function and before the main() function starts
#include <stdio.h> int addTwoNumbers(int, int); //function prototype int main() { /* www . j a v a 2 s . c om*/ printf("prototyped"); return 0; }
More function prototypes.
#include <stdio.h> int addTwoNumbers(int, int); //function prototype int subtractTwoNumbers(int, int); //function prototype int divideTwoNumbers(int, int); //function prototype int multiplyTwoNumbers(int, int); //function prototype int main() { // w ww . ja va 2 s .c o m printf("prototyped again"); return 0; }