1. similarities
Declarations and definitions specifies the type and name of the variable.
2. Different points
- Defined application storage space, it may be assigned an initial value for the variable, but the statement does not;
- Variables can be defined only once, but can be declared multiple times.
3. Examples
extern int i1; // 声明i1
int i2; // 声明并定义i2
extern int i3 =1; // 定义i3