Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - About a C++ constant integer problem!
About a C++ constant integer problem!

The answer is wrong. The correct answer is A, and B is barely acceptable. D is absolutely not possible, D is a floating point type (float).

For details, please refer to the following lines of the C++ official website (English):

The exponent, if present, specifies the magnitude of the number as a power of 10, as shown in the following example:

< p>18.46e0 // 18.46

18.46e1 // 184.6

The exponent may be specified using e or E, which have the same meaning, followed by an optional sign (+ or -) and a sequence of digits. If an exponent is present, the trailing decimal point is unnecessary in whole numbers such as 18E0.

I have a Chinese version that I translated, but I don’t know where it is yet. Where did it go...

And A is a literal long integer constant. The specific English explanation is as follows:

To specify an unsigned type, use either the u or U suffix. To specify a long type, use either the l or L suffix. For example:

unsigned uVal = 328u; // Unsigned value

long lVal = 0x7FFFFFL; // Long value specified < /p>

// as hex constant

unsigned long ulVal = 0776745ul; // Unsigned long value