Questions about the data type in C ++

Source: Internet
Author: User

In "C ++ primer", the numeric type of C ++ is divided into two types, respectively integer and Floating type. The integer type includes integer, character, and distributed type. Of course, both the integer and numeric types can be split, such as int, long, short, unsigned, and signed. Floating Point types include float, double, and long double. In C ++ for object-oriented programming, published by the Tsinghua University, the cloth model is removed, that is, in addition to the cloth model, it is mainly divided into two types: Integer type and floating point type. In fact, this question mainly depends on how to understand it, because only true and false are the value of the cloth type, that is, there are only two types of sentiment: 0 and non-negative. If we have to say true or false, then the generic type cannot be counted as an integer. If it is set to 0 or not, it can be regarded as an integer.
In addition, although there are all numeric-type word numbers, in fact, the ISOC ++ standard does not clearly define the number and value of each digital type, it just sets the number of characters between them in order:
(Signed/unsigned) char <= (unsigned) short <= (unsigned) int <= (unsigned) long.
This is mainly because different hosts are not used. Different machines have different implementations for this, so the word numbers will be different.

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.