|
-
Dec 21st, 2000, 06:50 PM
#1
Thread Starter
Member
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
-
Dec 21st, 2000, 06:59 PM
#2
Monday Morning Lunatic
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)
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Dec 21st, 2000, 07:13 PM
#3
Thread Starter
Member
-
Dec 21st, 2000, 07:13 PM
#4
Thread Starter
Member
-
Dec 21st, 2000, 07:19 PM
#5
Monday Morning Lunatic
No. And Yes. 
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
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Dec 22nd, 2000, 05:10 AM
#6
transcendental analytic
HEhehe, don't you know anything Benji?
Acting like a 14 year old huh^?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Dec 22nd, 2000, 05:59 PM
#7
Thread Starter
Member
I'm only acting like I dont know anything...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|