69,368
社区成员
发帖
与我相关
我的任务
分享
for (A;B;C) D;
//等价于
{
A;
while (1) {
if (!(B)) break;
D;
C;
}
}
#include <stdio.h>
#include"stdlib.h"
int main()
{
char y[9];
char qw[5];
char *s1="iya";
char *s2="abc";
int i=0;
for(;*s1;s1++,s2++,i++){
y[i]=*s2;
}
printf("i = %d\n", i);
y[i] = 0;
s1=&y[0];
printf("%s\n",s1);
system("pause");
}