在C语言中,变量的隐式初始化为0或1
We know that we need to declare variables before using it in our code. However, we variables can be assigned with 0 or 1 without declaration. In the following example we can see this.
Example
#include #include x, y, array[3]; // implicit initialization of some variables int main(i) { //The argument i will hold 1 int index; printf("x = %d, y = %d
", x, y); for(index = 0; index < 3; index++) printf("Array[%d] = %d
", i, array[i]); printf("The value of i : %d", i); }