know about header files in 'c'?

Header files in c contains the predefined functions, data type definitions and macros.
whenever we use certain predefined functions like 'printf and scanf ' we need to include the related library file, like stdio.h etc...
we can also create our own header file . we can do this by creating a file with the desired functions in it, then saving it in the ' include ' directory with the extension .h , this can be done in turboc. hence we can include the file in our program.

I just want the clarification about the standard libraries, is the code for the header files we use, written in the normal c programing language? and can we get the predefined code for the predefined functions like printf , scanf , strcmp , strcat ,............... etc ??
If yes from where do we get the code......???

Replies

  • vinci
    vinci
    tanvisharma
    Header files in c contains the predefined functions, data type definitions and macros.
    whenever we use certain predefined functions like 'printf and scanf ' we need to include the related library file, like stdio.h etc...
    we can also create our own header file . we can do this by creating a file with the desired functions in it, then saving it in the ' include ' directory with the extension .h , this can be done in turboc. hence we can include the file in our program.

    I just want the clarification about the standard libraries, is the code for the header files we use, written in the normal c programing language? and can we get the predefined code for the predefined functions like printf , scanf , strcmp , strcat ,............... etc ??
    If yes from where do we get the code......???
    you yourself gives the answer .that part is bold as of now here.Yes the code in header files is of C .Syntactically it comprises of C i.e it is written in C .moreover you again provided answer to you other question also/Again the bold part includes the answer.In include library we can have all the header file so you can take the code from there.Let us know if we can help you in any more issue.
  • tanvisharma
    tanvisharma
    yes but but when is was asked the same question in an interview, i answered it the same answer which i have posted, but he said i was wrong.....
    he asked me if we can find the code in the header files.....

You are reading an archived discussion.

Related Posts

Dear all, I am a textile engineer and recently working as a machine designer, R&D in textile machine mfg company since 1 year.What are the future opportunities for me as...
CERN's live broadcast which is updating their progress in searching for theHiggs Boson - Watch it here: https://webcast.web.cern.ch/webcast/play_higgs.html
dear all, If we have a concrete column being transfered at some level, is it a good assumption to pin the bottom of the column so it carries just axial...
hie Engineers i'm planning to install a softphone in a picocontroller for my final year project... Is it possible? if possible, which PIC is the best for that? which is...
From the mail: Sixty and Going Strong​ (Translated from the original in Chinese)​ “There are 1000-year old trees in the mountain, but not many 100 year-old people” At the most,...