know about header files in 'c'?

tanvisharma

tanvisharma

@tanvisharma-wSaer7 Oct 26, 2024
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

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • vinci

    vinci

    @vinci-e4PtMU Jul 4, 2012

    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

    @tanvisharma-wSaer7 Jul 4, 2012

    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.....