Custom Search

Wednesday 9 November 2011

Header File Definition, Various Header File use in C, Use of Header File, Name Description of Various Header Files, Use of , , , C Library Header File, various header files in c language with ites use

Header File Definition, Various Header File use in C, Use of Header File, Name  Description of Various Header Files, Use of <float.h>, <ctype.h>, <stdio.h>, C Library Header File, various header files in c language with ites use

Header File Definition
Header files allow programmers to separate certain elements of a program's source code into reusable files. Header files commonly contain forward declarations of classes, subroutines, variables, and other identifiers. Programmers who wish to declare standardized identifiers in more than one source file can place such identifiers in a single header file, which other code can then include whenever the header contents are required. This is to keep the interface in the header separate from the implementation. The C standard library and C++ standard library traditionally declare their standard functions in header files.

Use of Header Files

Header files are included into a program source file by the ‘#include’ preprocessor directive. The C language supports two forms of this directive; the first,

#include "header"
is typically used to include a header file header that you write yourself; this would contain definitions and declarations describing the interfaces between the different parts of your particular application. By contrast,

 #include <file.h>
is typically used to include a header file file.h that contains definitions and declarations for a standard library. This file would normally be installed in a standard place by your system administrator. You should use this second form for the C library header files.


Name--Description

  • <assert.h>--Contains the assert macro, used to assist with detecting logical errors and other types of bug in debugging versions of a program.
  • <complex.h>--A set of functions for manipulating complex numbers.
  • <ctype.h>--Contains functions used to classify characters by their types or to convert between upper and lower case in a way that is independent of the used character set (typically ASCII or one of its extensions, although implementations utilizing EBCDIC are also known).
  • <errno.h> --For testing error codes reported by library functions.
  • <fenv.h>--For controlling floating-point environment.
  • <float.h>--Contains defined constants specifying the implementation-specific properties of the floating-point library, such as the minimum difference between two different floating-point numbers (_EPSILON), the maximum number of digits of accuracy (_DIG) and the range of numbers which can be represented (_MIN, _MAX).
  • <inttypes.h>--For precise conversion between integer types.
  • <iso646.h>--For programming in ISO 646 variant character sets.
  • <limits.h>--Contains defined constants specifying the implementation-specific properties of the integer types, such as the range of numbers which can be represented (_MIN, _MAX).
  • <locale.h>--For setlocale and related constants. This is used to choose an appropriate locale.
  • <math.h>--For computing common mathematical functions.
  • <setjmp.h>--Declares the macros setjmp and longjmp, which are used for non-local exits.
  • <signal.h> --For controlling various exceptional conditions.
  • <stdarg.h>--For accessing a varying number of arguments passed to functions.
  • <stdbool.h>--For a boolean data type.
  • <stdint.h>--For defining various integer types.
  • <stddef.h>--For defining several useful types and macros.
  • <stdio.h>--Provides the core input and output capabilities of the C language. This file includes the venerable printf function.
  • <stdlib.h>--For performing a variety of operations, including conversion, pseudo-random numbers, memory allocation, process control, environment, signalling, searching, and sorting.
  • <string.h>--For manipulating several kinds of strings.
  • <tgmath.h>--For type-generic mathematical functions.
  • <time.h>--For converting between various time and date formats.
  • <wchar.h>--For manipulating wide streams and several kinds of strings using wide characters - key to supporting a range of languages.
  • <wctype.h>


No comments:

Post a Comment

Laptops