must know about the header files in c.

We all know that header files contain some predefined functions, yes thats exactly true.
but we have to know how the program is present in the header files....

header files are nothing but simple text files with ".h" extension, all the header files are present in the include directory, which we can find when we open the turboc.

the header files does not contain the whole code for the predefined functions, but it just contains the prototypes required for the function( i.e predefined functions).

and the actual code is present in the library not in text files but,
the actual code object file is present in the library.

so when we start the compilation process, the code is copied in the place of the header file....
and finally the program is executed.... 😀

Replies

  • Uday Bidkar
    Uday Bidkar
    Well, it's partially correct, compiler does not copy "code" in place of header file. Compiler copies exact contents of the .h file into the unit it's included in while compiling and generates object file for that particular compilation module. Linker then comes in picture which combines the different compiled modules and generates an executable. This is why you get a "Linker error" if you just declare a function and dont define it.

You are reading an archived discussion.

Related Posts

The idea of the project is to create a web application that serves as a help desk in a campus. Abstract: This is an application used to create a help...
The idea is to develop an application that will be used to manage stationary and maintain records about the same. Abstract: This project is aimed at developing a tool for...
I am studying various excerpts in this domain..found interest in OCR...it would be very helpful if someone would enlighten about some more application aspects in this domain..
The project's idea is to create a website that can be used to maintain family and friends connections by communication and sharing means. Abstract: Family Connections is an content management...
now that we know the various types of springs, their applications, their design formulae, as well as the materials well suited for them, now do we go about manufacturing them...