What is the maximum value of an unsigned integer?
Category:
business and finance
entertainment industry
As shown in http://www.tutorialspoint.com/cprogramming/c_data_types.htm (and many other places), unsigned int can be 2 bytes or 4 bytes. In your case, you are using 4 bytes so the maximum is 4,294,967,295. The maximum you mention, 65535 corresponds to 2 bytes.
Then, what is the maximum value of an unsigned 32 bit integer?
The number 4,294,967,295, equivalent to the hexadecimal value FFFF,FFFF16, is the maximum value for a 32-bit unsigned integer in computing.
Also question is, what is the maximum value of unsigned int in C?
C integer types value ranges
Type | Storage size | Maximum value |
---|---|---|
unsigned char | 1 byte | 255 |
signed char | 1 byte | 127 |
int | 2 bytes or 4 bytes | 32,767 or 2,147,483,647 |
unsigned int | 2 bytes or 4 bytes | 65,535 or 2,147,483,647 |
Int64 struct. It is signed and takes 64 bits. It has minimum –9,223,372,036,854,775,808 and maximum 9,223,372,036,854,775,807 value.