CPP learning Note 2 Data Type

Source: Internet
Author: User
Int A = 5; // declared as integer short int B = 10; // small memory occupied by short integer long c = 100; // omitting int means long integer long d = 100; // allocate more space for unsigned long e = 10000; // The unsigned long integer type is positive integer unsigned long F = 10000000; // The unsigned long integer allocates more memory space types as positive integer float G = 10.0; // float double H = 11.00; // double float char I = 'a'; // fill, in general, the system defaults to the integer <PRE name = "code" class = "CPP"> printf ("% d", a);/* % d format specifier it indicates printf () how should data be output? Each specifier can correspond to only one variable */

 

The memory size occupied by each data type is not only related to the system but also to the compiler.


CPP learning Note 2 Data Type

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.