- Link, combine all the associated. O Target files and C function libraries in the project to generate executable files;
- The definition of the function is placed in a. c file, and the declaration of the function is placed in the. h file;
- If you want to use a function defined in a. c file, you only need to #inclued the. h file that corresponds to the. c file;
- The role of the. h file: Be copied by others, compile the link without the need to tube. h file
- Other considerations: \ n is an escape character; \ t is the TAB key; The default return value type of the printf function is int, and it returns the number of characters that are steady, not the word count, and 1 Chinese characters that account for 3 character;
- Self-understanding. h and. c files,. h files are also called header files, and the main function is to declare functions to function. If the system comes with the library, as long as in their own development program to introduce the header file, then the compilation can pass, because the compilation will only check syntax errors, not error, but there is a warning, as long as the link, your program will be connected with the introduction of the function definition, this time to execute the program success One is the declaration of a function, one is the definition of a function, and we place the declaration of the function in the. h file, and the definition of the function in the. c file;
- The declaration is to declare what method it has, not to implement it concretely; define what function it has, and develop it for others;
What did the. c file and. h file do separately? C