C data types limits

How to remember size of data type in c?

    If you have memorized the size of data type in all types c compiler then there is not any problem. If you cannot memorized then it is also not a problem because every c compiler provide one header file <limits.h> which contain some micro constants for size of integral data type which is easy to memorize. Those micro constants are:

       IN TURBO C++ IDE (Header file: <limits.h>)

  IN LINUX GCC Compiler (Header file: <limits.h>,<float.h>)

Make the habit to use macro constant to check boundary condition so that your programs will more platforms independent.

1 comment:

Abhishek Bunty said...

find the range of data types using limit.h