about header files

C

csudha

hi,
I wish to know whjat are all the header files used in c and their
use with example.
Regards,
sudha.
 
J

Jens.Toerring

csudha said:
I wish to know whjat are all the header files used in c and their
use with example.

Could you be a bit more specific? There are probably millions and
millions of header files, so a complete listing, even without
examples of their use, would be a bit long for a posting (not that
I claim to have a complete list;-)

If you mean the C standard header files here's a list of all
of them according to the C99 standard:

<assert.h>
<complex.h> *
<ctype.h>
<errno.h>
<fenv.h> *
<float.h>
<inttypes.h> *
<iso646.h> *
<limits.h>
<locale.h>
<math.h>
<setjmp.h>
<signal.h>
<stdarg.h>
<stdbool.h> *
<stddef.h>
<stdint.h> *
<stdio.h>
<stdlib.h>
<string.h>
<tgmath.h> *
<time.h>
<wchar.h> *
<wctype.h> *

(the star marks the ones that were not already in the C89 standard).
As you can see that are still quite a lot and even trying to explain
what they are good for would make this post rather long-winded. It
would probably be a better idea to get a decent book on C that ex-
plains in all the required details what they do.

Regards, Jens
 
J

jacob navia

csudha said:
hi,
I wish to know whjat are all the header files used in c and their
use with example.
Regards,
sudha.
Header files contain declarations that are needed in the rest of the
code that uses them.

This declarations can be:
1: #defines
2: Data type declarations (structures, global variables, etc)
3: Prototypes.

jacob
 
A

Alan Balmer

hi,
I wish to know whjat are all the header files used in c and their
use with example.
Regards,
sudha.

This information will be in almost any textbook on C.
 
D

Dan Pop

In said:
Header files contain declarations that are needed in the rest of the
code that uses them.

This declarations can be:
1: #defines
2: Data type declarations (structures, global variables, etc)
3: Prototypes.

4: inline function definitions (for projects that can afford using them)

Dan
 
M

Malcolm

csudha said:
I wish to know whjat are all the header files used in c and their
use with example.
You've got three classes of header.
1) standard library headers.
2) third party library headers.
3) headers you write yourself, specific to the program.

Conventionally, class 1 and 2 are #included

#include <stdlib.h>

class 3 is # included

#include "myheader.h"

#include is just a wordprocessing command, which includes the test of
another file in the target. Howewver conventionally headers contain external
variables, structures, #defines, typedefs, and prototypes.

The idea is that you give the #including file an interface to the functions
you put in the header.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top