Jay Sern Liew wrote:
how do I find out the maximum (and minimum) value a long and int will hold
in C? (before it overflows or underflows)

#include <limits.h>


INT_MAX and INT_MIN  are the max/min values for an int
LONG_MAX and LONG_MIN are the max/min values for long.

Also, see stdint.h, which is defined in C99.

Also, buy a good C reference book. ;-)

Tim Kientzle

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to