Differences between basic data types of 32-bit and 64-bit linux

Source: Internet
Author: User
This article mainly introduces the differences between the basic data types of 32-bit and 64-bit machines in linux. For more information, see basic data types.
Data type 32-bit 64-bit
Char 1 1
Int 4 4
Long
4 8
Float 4 4
Double 8 8
Long double 12 16
Long 8 8

You can specify the length of an int:
Data type 32-bit 64-bit
Int32_t 4 4
Int64_t
8 8

Similarly, uint32_t and uint64_t

Other data types

1, size_t: same as the machine font;
2. off_t: the default 32-bit length for 32-bit machines. in this case, you cannot offset files larger than 4 GB. in this case, off_t = _ off_t; if you want to perform a file offset operation greater than 4G, you can add the header file in the program before defining
In this case, off_t = _ off64_t is defined in unistd. h. for 64-bit machines, the default value is 64-bit length.

# Define _ FILE_OFFSET_BITS 64

3. ino_t: same as the machine font.

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.