发个图,比比看
#include <stdio.h>void main()
{
int i;
char c[] = "1234567";
for( i = 0; c[i] != '\0'; i++ )
printf("%c ", c[i] );
putchar('\n');
printf("%d", i);
putchar('\n');
int j;
char b[7] = {'1','2','3','4','5','6','7'};
for( j = 0; b[j] != '\0'; j++ )
{
printf("%c ", b[j] );
printf("%d\n", j);
}
putchar('\n');
printf("%d\n", j);
int k;
char d[] = {'1','2','3','4','5','6','7'};
for( k = 0; d[k] != '\0'; k++ )
printf("%c ", d[k] );
putchar('\n');
printf("%d\n", k);
int m;
char e[7] = {'1','2','3','4','5','6'};
for( m = 0; e[m] != '\0'; m++ )
printf("%c ", e[m] );
putchar('\n');
printf("%d\n", m);
}