The initial value of the C language int type array

  1. The initial value of the int type array of the global variable defaults to 0
  2. The initial value of an array of local int type is a random garbage value

Global array
Non-global array

Guess you like

Origin blog.csdn.net/Supreme7/article/details/109683148