What is header file in c?


Include directory is special directory which content all the header files of c language. Extension of header files in c language is h. All header files only keep declaration of functions, declaration of data type and micro constants. Body of function i.e. function definition is not written in the header files. Hence no one can get source code of function like printf, clrscr etc. All the function declaration in header file is extern. Since visibility of extern data type is whole the program. Hence other file can also access such function. Body of function of header file is supplied at the time of linking.







  • Preprocessor definitions in c
  • Preprocessor directive in c
  • #include directive in c
  • # define directive in c
  • Pragma directive in c
  • Warning directive
  • Preprocessor operators in c
  • # if directive in c
  • #line directive in c
  • # error directive in c
  • # elif in c
  • # ifdef and #endif in c
  •  # ifndef in c example
  • #undef in c
  • What is header file in ?
  • C preprocessor questions
  • C tutorial home.
  • 2 comments:

    Anonymous said...

    if definition of functions is not saved in header files,then where these are saved?

    Priyanka kumari said...

    Function definition is added at the time of linking. It is saved at compiler.