Re: integer and long max/min values
From: Tim Kientzle (kientzle_at_acm.org)
Date: 11/21/03
- Previous message: Dag-Erling Smørgrav: "Re: interrupt statistics"
- In reply to: Jay Sern Liew: "integer and long max/min values"
- Next in thread: Richard Coleman: "Re: integer and long max/min values"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 21 Nov 2003 00:24:03 -0800 To: Jay Sern Liew <liew@jaysern.org>
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
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Dag-Erling Smørgrav: "Re: interrupt statistics"
- In reply to: Jay Sern Liew: "integer and long max/min values"
- Next in thread: Richard Coleman: "Re: integer and long max/min values"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|