can anybody tell me what the sizes are for:
int
long
float
double
char
and not in bytes...
the max size I mean...
Thanks,
Dennis
Printable View
can anybody tell me what the sizes are for:
int
long
float
double
char
and not in bytes...
the max size I mean...
Thanks,
Dennis
Maximum values for integral types are (2^sizeof(type)-1) :)
NOTE: All values are UNSIGNED!
int = this is system dependent, on 32bit int=long, on 16bit int=short - 32bit = 4294967295
long = 4294967295
char = 255
Also:
float = 3.4E +/- 38 (7 digits)
double = 1.7E +/- 308 (15 digits)
so an int is:
32768
?
(signed)
No. And Yes. :D
If you're using a 16bit system, an int is 16 bits. On a 32bit system, an int is 32 bits. It's matched to the size of the system word.
So:
16bit - signed int = 32767 (starts at 0)
32bit - signed int = 2147483647
HEhehe, don't you know anything Benji?
Acting like a 14 year old huh^?
I'm only acting like I dont know anything... :rolleyes: