Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - The difference between integer data, character data and string data
The difference between integer data, character data and string data
Integer data is data stored as binary values, that is, it can be signed or unsigned; Short and long can specify different lengths. On different platforms, the length can be 8 bits, 16 bits, 32 bits or even 64 bits.

Character data is character data (also a numerical value expressed in binary) stored in the ASCII code of characters. Although it can be divided into unsigned and signed, usually characters only take up one byte, that is, eight binary bits.

String data is a series of character data stored in ASCII code of characters. In C language, these characters are stored in memory continuously, and the character' \0' must be stored after these characters as a string terminator.