C language basic type long long int

Source: Internet
Author: User

As we all know, int is the default of 4 bytes under Linux system, and the value range is: -2147483648~2147483647. Even the unsigned unsigned int type represents the range: 0-4294967295, approximately 4.2 billion.

In most cases, the type of int can meet the needs, but there are no shortage of special circumstances; today, when doing ineedle test, the contract tool is used to contract, the speed is fast, the int type has not satisfied the demand. It is time to think of a long long int type, a long long int with a range of values: -9223372036854775808--9223372036854775807;unsigned long Long int type value range: 0--18446744073709551615. This range of values is still surprisingly large, and it occupies 8 bytes in memory.

When using printf you need to be aware of:

Represents unsigned long long:printf ("num =%llu\n", num);
Represents a long long int:printf ("num =%lld\n", num);

?

C language basic type long long int

Related Article

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.