The unassigned element value of the array

For uninitialized variables,

if it is a global variable, 0
is automatically assigned; if it is a local variable, a random value, so the character array is not initialized, and finally a'\0' must be assigned;
Insert picture description here
for initialized variables,
local variables and global variables, the unassigned elements are all Is 0;

Guess you like

Origin blog.csdn.net/RunningBeef/article/details/107828338