954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Integer data type

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

fero45
Newbie Poster
4 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

In the 32 bit world integers have a range of:

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

vegaseat
DaniWeb's Hypocrite
Moderator
5,989 posts since Oct 2004
Reputation Points: 1,345
Solved Threads: 1,417
 

In the 32 bit world integers have a range of:

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

I see. Thank you.
Frank

fero45
Newbie Poster
4 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You