Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Some problems about characters and numbers in C language: the difference between 0 and "0"
Some problems about characters and numbers in C language: the difference between 0 and "0"
First, the data types are different.

1, 0: stands for the number 0.

2.' 0': Represents the character 0.

Second, the computing power is different.

1, 0: It has computing power.

2. "0": It is a literal data type with no computing power.

Third, memory storage is different.

1, 0: consists of numbers, decimal points, plus or minus signs and the letter e, and the letter e is represented by the letter n ... The value range of numerical data is:-0.9999999999 e+19++09+to 0.999999999 e+20, including symbols, decimal points and the letter e.

2.' 0': including Chinese characters, English characters, numeric characters and other ASCⅱII II characters, with the length (i.e. the number of characters) ranging from 0 to 255 characters, i.e. 0x00 to 0xFF.

Baidu Encyclopedia-Numerical Data

Baidu Encyclopedia-Character Data