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
#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; }