不明白该程序如何运行的,为什么运行的结果是这样的
#include
int main()
{
int i;
char a[10], b[10];
char *st[] = {"one", "two", "three", "four"};
printf("%s#", *st);
for (i = 0; i < 4; i++)
b[i] = *(st[i] + 1);
b[i] = '\0';
puts(b);
return 0;
}
one#nwho
Process exited after 0.206 seconds with return value 0
请按任意键继续. . .
b[i] = *(st[i] + 1);
这行的意思就是取得str数组中每个字符串的第1个字符啊。nwho分别是四个字符串第1个字符(从0开始)