Day#89 C' Coding Challenge

Day#89 C' Coding Challenge

We have header files and sources in programs. In header files, functions are declared or defined?

------------------------------------------

Header files in C Programming contains the following:
  • Function Declaration
  • Global variables
  • Macros
The predefined libraries in C programming can be included in the codes (.c files) we are writing by using header files. When we include header files in our C program, all C code of the header files are included in C program. Then, this C program is compiled by compiler and executed. There could be multiple header files included in a source file (.c extension).  Examples include:

#include <stdio.h>
#include <strlib.h>
#include <string.h>

Apart from the standard libraries, users while programming can define their own .h files as well and include them across the .c files when needed.

Header file has .h header extension and header files can be included using (preprocessor directive):
#include<filename.h>

Post a Comment

0 Comments