Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What's the difference between 0 and' 0' in C language?
What's the difference between 0 and' 0' in C language?
There are many differences between 0 and' 0' in C language.

In terms of storage space, the integer 0 can occupy 2 bytes (int) or 4 bytes (long).

But the character "0" only occupies 1 byte. (character)

In terms of logical operation value, 0 and non-zero' 0' (ASCII code value is 48) are two main differences, such as! 0 = 1 ! '0'=0;

Therefore, 0 and' 0' are two completely different concepts! They are also related, that is, the integer value of' 0' is 48, and ascii code 0 stands for empty operation.

wait for ...