Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - The difference between charc=0 and inta=1
The difference between charc=0 and inta=1

The specific differences between char and int in C language are as follows:

1. The variable types represented are different:

char is a character variable, while int is an integer variable .

2. The types of data requested are different:

char is used to apply for characters and strings or string pointers; int is used to apply for integer data or integer data pointers.

3. Bytes and the contents that can be represented are different:

char has only one byte, int has 4 bytes, and the contents that can be represented are different in size; char has only 0~ 255, int range [-2^31, 2^31 -1] (the processor can be larger if it is 64-bit)