Hi I to all I have the following question, I hope you can help me:
I need to store variables, in diferent variable types, but I want to know for example the size of the int type what size of number I can store, I found that int can store 4 bytes, but I don't undertand what size is this?
I found the following explination, with all the sizes.
http://msdn2.microsoft.com/en-us/library/cc953fe1.aspx
My question is if I have an integer, and its writen 4 bytes how it look the number in decimal.
Thanks
dev.cplusplus
0
Junior Poster in Training
Recommended Answers
Jump to PostEach byte is 8 bits. 8 bits can hold from the value 0 to 2^8th (2 to the 8th power) or 0-255. Therefore 4 bytes can hold up to 2^(4*8) or 2^32nd. That's 4,294,967,296.
Now these are for unsigned values. Normally, though, values are signed which means 1 bit …
All 3 Replies
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
jbennet
1,618
Most Valuable Poster
Team Colleague
Featured 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.