Just finished going through C in easy steps and reading C in Jensens and now I am going on to C++ and as I am a slow learner and I need to understand before I can learn or do things, it suddenly hit me while reading and doing Schildt C++ from the ground up I didn't understand what the largest or even the smallest number was capable of or in how it worked. In 32 bit the largest number is 4 billion 294 million 967 thousand 295. I did some programming years ago in a data base environment and the questions of numbers didn't come up but in my last job in accounting I found that many peoples programs could not do the millions quantity that was required when selling fuel in litres to large tugs and we didn't do large ships so I do not know how that was handled but does this 4 billion refer to the numbers in quantity or the amount of numbers I can put on a line or what? Something in my head does not compute so any help would be appreciated. I could not find a thread here nor an answer in any of the books I have got.
Thank you
AllenN
0
Newbie Poster
Recommended Answers
Jump to PostMaybe i'm unclear of the question.. but a number is just a number - you can use it to represent whatever you want. There's nothing particulary special about your 32 bit max value.. some systems can handle more, other systems can handle less, although, if you get hold of a …
Jump to PostIn some respects, you don't even need to know the actual upper limits to write safe code. For example,
#include <stdio.h> #include <limits.h> int main(void) { int x; for ( x = 1000; x < INT_MAX / 2; x *= 10 ) { printf("x = %d\n", x); …
Jump to Post>> ...my mind still hasn't grasped how this number system works, is there some place I can read about it...
http://en.wikipedia.org/wiki/Signed_number_representations
All 10 Replies
iamthwee
Bench
212
Posting Pro
SpS
commented:
Rightly Said About Herbert Schildt
+4
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
AllenN
0
Newbie Poster
Dave Sinkula
2,398
long time no c
Team Colleague
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
vijayan121
1,152
Posting Virtuoso
SpS
commented:
Helpful
+4
Bench
212
Posting Pro
mark busenitz
0
Newbie Poster
AllenN
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.