#include <stdio.h>//function Declaration//declaring method One//int sum (int v1, int v2);//function declarations can be defined repeatedly//only the function declaration, no implementation of the function at compile time is no problem//The compiler will only check for syntax errors, and the link will see if the function is actually implemented.//declaring method twointSumint,int);intSumint,int);intSumint,int);intSumint,int);intMain () {printf ("ooooooo\n"); intA =Ten; intb = -; //The function declaration is not a problem in writing to the function body.//just declare it before the function is used//declaration Method Three intSumint,int); intresult=sum (A, b); printf ("sum =%d\n", result); return 0;}//functions cannot be defined repeatedly//int sum (int v1, int v2)//{//return v1 + v2;//}//int sum (int v1, int v2)//{//return v1 + v2;//}
Declaration of C-language functions