- Joined
- Jul 26, 2001
- Location
- Houston, TX
What is the greatest positive value of each be?
int:
long int:
float:
double:
Thanks for the help.
int:
long int:
float:
double:
Thanks for the help.
Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!
XWRed1 said:All the data types could be any size, it just depends on the compiler and architecture.
short to be at least 16 bits, a long to be at least 32 bits, and an int must be greater than or equal to a short and less then or equal to a long.
srimmer said:Not to mention that you are going to be in trouble if you are relying on a data type to be larger than the minimum specified. I would not want my program to break just because I used signed integers larger than 32,767, and tried to compile on a non-microsoft compiler. MS has been known to deviate from standards from time to time...
I am assuming C++. Java has specified size.
Now, OP, I am hoping this isn't a homework question. If it is then you should really be googling for this. This is the best site I've found to be:
If this is a homework question, it's about 6 years too late...