Understanding of function declaration and function definition in C language
This article mainly talks about "the understanding of function declaration and function definition in c language". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "the understanding of function declarations and function definitions in c language".
1. Function declaration, there is no need to implement the function of the function. The function declaration is just an empty shell and there will be no specific function implementation.
2, function definition, must realize the function of the function, must realize the function of the function.
# include
Example
/ before using the function, you need to declare int getMax (int, int); void main () {int t=getMax (12,21); printf ("% d\ n", t); getchar ();} int getMax (int a, int b) {if (a > b) {return a;} else {return b before using the function }} at this point, I believe you have a deeper understanding of "the understanding of function declarations and function definitions in the c language". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!