Hi every body!
I hope you guys are having a good day.
I was reading about long int type in c++. Here is what i find:
A signed long can hold all the values between LONG_MIN and LONG_MAX inclusive. LONG_MIN is required to be -2147483647 or less,A signed long can hold all the values between LONG_MIN and LONG_MAX inclusive. LONG_MIN is required to be -2147483647 or less, LONG_MAX must be at least 2147483647. Again, many 2's complement implementations will define LONG_MIN to be -2147483648 but this is not required.
An unsigned long can hold all the values between 0 and ULONG_MAX inclusive. ULONG_MAX must be at least 4294967295. The long types must contain at least 32 bits to hold the required range of values. LONG_MIN to be -2147483648 but this is not required.
An unsigned long can hold all the values between 0 and ULONG_MAX inclusive. ULONG_MAX must be at least 4294967295. The long types must contain at least 32 bits to hold the required range of values.
================================================== ===
"long - min is required to be -21478364 or less",
my question is how much less? why long_min is required to be -214783647?
"A LONG_MAX must be at least 2147483647." why long-max must be atleast 2147483647?
Thanks a lot and have a nice day!