strcpy 输出结果求解释!多谢
#include<stdio.h>#include<string.h>
int main(void)
{
char s[]="123456789";
char d[]="123";
strcpy(d,s);
printf("%s,\n%s",d,s);
return 0;
}
输出结果为
123456789
56789
2011-09-13 15:41

2011-09-13 15:54
2011-09-13 16:00
程序代码:
#include<stdio.h>
#include<string.h>
int main(void)
{
char s[]="123456789";
char d[]="123";
printf("S: %X\nD: %X\n", s, d);
strcpy(d,s);
printf("%s,\n%s\n",d,s);
return 0;
}

2011-09-13 16:03

2011-09-13 16:06
2011-09-13 16:06

2011-09-13 16:09
2011-09-13 20:58