Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - Define one-dimensional array without assignment, what is the initial value, should it be divided into static array and dynamic array?
Define one-dimensional array without assignment, what is the initial value, should it be divided into static array and dynamic array?
Unassigned words are very small negative numbers.

Global or static arrays are initialized to 0.

Here's an example for you.

# include & ltstdio.h & gt

int a[3];

int main()

{

Static int b [3];

int c[3];

for(int I = 0; I<3; i++)

{

printf("%d ",a[I]);

}

printf(" \ n ");

for(I = 0; I<3; i++)

{

printf("%d ",b[I]);

}

printf(" \ n ");

for(I = 0; I<3; i++)

{

printf("%d ",c[I]);

}

}