Possible Duplicates:
How would you set a variable to the largest number possible in C?
maximum value of int
I need to use the maximum integer value in my my code, but I don't want to explicitly write 4294967295. Is it defined somewhere?
Possible Duplicates:
How would you set a variable to the largest number possible in C?
maximum value of int
I need to use the maximum integer value in my my code, but I don't want to explicitly write 4294967295. Is it defined somewhere?
INT_MAX
(for int
) or UINT_MAX
(for unsigned int
) defined in <limits.h>
There shall be a constant in limits.h
, if I'm not mistaken it shall be INT_MAX
The include file stdint.h
includes all different macros for the different integer types. In particular UINTMAX_MAX
for uintmax_t
.