Hi
Integers ahve a range from -32.767 to +32,767. How come I can use the following code:

int a = 1000000;
int b = 5000000;
int c = a + b;
cout << c << endl;

... and it works?
Thanks
Frank

Recommended Answers

All 2 Replies

In the 32 bit world integers have a range of:

-2,147,483,648 to 2,147,483,647

In the 32 bit world integers have a range of:

-2,147,483,648 to 2,147,483,647

I see. Thank you.
Frank

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.