The initial simple C language array of journey (array) of

Ⅰ, initialization simple array (Array) of:
①, can be run directly off of code //
#include <stdio.h>
int main ()
{
int I, m [. 6] = {0}, SUM = 0; / / definitions to represent all the values m [6] are 0;
for (I = 0; I <. 6; I ++) // Note the subscript index must not exceed defined otherwise, the array index value exceeds the random distribution, compile and run without error, but the results must be wrong
{
SUM + = m [I];
the printf ( "the Number of m [% D] =% D \ n-", I, m [I]);
}
the printf ( "the Number of SUM:% D \ n-", SUM);
return 0;
}
②, the results show:
For example: this procedure is mainly to initialize the array, the value assigned to the array value and its unfolded, the results as shown below :
Here Insert Picture Description
☺ message:
ⅰ, this program running on the Visual C ++ version 6.0;
ⅱ, if I give the procedure in question, or there is a problem in terms of narrative, I can not read or explain the meaning, or message please indicate and I discussed, thank you big brother! ! !
Ⅲ,
this program can be used for other assignments and not only for the value 0, be sure to come off or write your own input again, or certainly do not understand, only the code knock a few times in order to truly understand the meaning of the inside;

Published 40 original articles · won praise 0 · Views 590

Guess you like

Origin blog.csdn.net/weixin_43405300/article/details/104027598