Join Regular Classroom : Visit ClassroomTech

Header file in C

What is header file ?

In C programming language there are many standard pre-defined functions, that we can directly include in our code to make programming easy. There are many standard header file that is ready to use, or we can make our own header file(user defined header file).

We have to include the header file using the preprocessing directive “#include”. Every header file has a “.h” extension.

SYNTAX –
      1. #include<file_name.h> – standard header file [all header file should have .h extension]
      2. #include”file_name.h” – user defined header file

Header files contains –
              1. Functions
              2. Macros
              3. Data type definitions

Example :

Creating our own header file:

Including user defined header file in our code:

Recent Posts