int8 uint8 Difference

Source: Internet
Author: User
Pecific Integral type Limits
specifier Common equivalent Signing Bits Bytes Minimum Value Maximum Value
int8_t Signed Char Signed 8 1 −128 127
uint8_t unsigned char Unsigned 8 1 0 255
int16_t Short Signed 16 2 −32,768 32,767
uint16_t unsigned short Unsigned 16 2 0 65,535
int32_t Int Signed 32 4 −2,147,483,648 2,147,483,647
uint32_t unsigned int Unsigned 32 4 0 4,294,967,295
int64_t Long Long Signed 64 8 −9,223,372,036,854,775,808 9,223,372,036,854,775,807
uint64_t unsigned long long Unsigned 64 8 0 18,446,744,073,709,551,615

There are some platform-independent data types, because long occupies a different number of bytes in 32-bit machines and 64-bit machines, so it is recommended to use the above type: The header file of the above type is stdint.h

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.