Where to find limits of C data types?

Humble Devassy Chirammal Forums C-programming.. Where to find limits of C data types?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #2308 Reply
    Humble
    Keymaster

    Refer limits.h for the details. It includes the limits..

    
    
    #  define CHAR_BIT  8
    
    
    #  define SCHAR_MIN (-128)
    #  define SCHAR_MAX 127
    
    
    #  define UCHAR_MAX 255
    
    
    #  ifdef __CHAR_UNSIGNED__
    #   define CHAR_MIN 0
    #   define CHAR_MAX UCHAR_MAX
    #  else
    #   define CHAR_MIN SCHAR_MIN
    #   define CHAR_MAX SCHAR_MAX
    #  endif
    
    
    #  define SHRT_MIN  (-32768)
    #  define SHRT_MAX  32767
    
    
    #  define USHRT_MAX 65535
    
    ......
    
    #  if __WORDSIZE == 64
    #   define ULONG_MAX    18446744073709551615UL
    #  else
    #   define ULONG_MAX    4294967295UL
    #  endif
    
    
    `
Viewing 1 post (of 1 total)
Reply To: Where to find limits of C data types?
Your information: