Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How does C++ output an integer array
How does C++ output an integer array
Integer arrays are not data types, so you can't directly output data of types int and char first. Only one loop (for loop or while loop) can output the numbers in the array in turn.

For example:

# include & ltstdio.h & gt

# include & ltstring.h & gt

int? Master ()

{

int? a[5]={0,0,0,0,0},I;

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

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

printf(" \ n ");

I = 0;

And (I & lt5){

printf("%d?" ,a[i++]);

}

Return? 0;

}

/* Operation result:

0? 0? 0? 0? 0

0? 0? 0? 0? 0

*/