Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Who writes header files

Tags:

c

header-files

We have been learning C and it might seem like a stupid question to ask. I want to know who exactly writes header files. I know that they have predefined functions in them and can be accessed as per need.

like image 467
user3743672 Avatar asked Dec 01 '22 01:12

user3743672


2 Answers

The header files that come with your compiler are written by the authors of your compiler and C library. Header files for third-party libraries are written by the authors of those libraries. Header files for your software are written by you.

like image 200
user3553031 Avatar answered Dec 02 '22 15:12

user3553031


Header files are written by the programmers to export the library functions or class. Header files may used to define classes, macros , member functions, structures, variables etc. if you make some changes in header files of your library it may affect your library functions. You have to recompile the library before use.

like image 26
Prasaathviki Avatar answered Dec 02 '22 15:12

Prasaathviki