c - what is the unsigned datatype? -
I've seen this unsigned
"typeless" type for a while, but never Notice that for an explanation I think there is a compatible signed code
here is an example:
static unsigned long next = 1; / * RAND_MAX is considered 32767 * / int minor (zero) {next = next * 1103515245 + 12345; Return (( unsigned) ) (next / 65536)% 32768); } Zero mysrand ( unsigned seeds ) {next = seeds; }
Whatever I have collected:
- On my system, sizeof (unsigned) = 4
(signal on a 32-bit unsigned int )
This can be used in the unsigned version as a short story for other types of foundations:
long end int = -42 signed; Printf ("% u \ n", (unsigned) i);
Is this ANSI C, or just a compiler extension?
unsigned
for the actual unsigned int
There is a short story, and is defined in standard C.
Comments
Post a Comment