Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - What's the difference between a long integer and an integer? Why are there so many kinds of integer variables?
What's the difference between a long integer and an integer? Why are there so many kinds of integer variables?
Int is the basic integer type in all systems, which is generally 32 bits, that is to say, it can store numbers ranging from -32768 to 32767.

Long usually takes up more storage space than int and is used to store larger numbers than int can store.

Moreover, short generally takes up less space than int, and int is used to save smaller numbers to save space.

Books recommend "C++ Primer". You can go to Baidu Library:

/view/7 1 d40 da 1284 AC 850 ad 0242 16 . html

All right, that's all. You can ask me again if you have any questions:-D.