#include <iostream>
#include <stdio.h>
int main()
{
char s[]="123456789";
char d[]="123";
strcpy(d,s);
printf("-%s-,\n-%s-\n",d,s);
return 0;
#include <stdio.h>
int main()
{
char s[]="123456789";
char d[]="123";
strcpy(d,s);
printf("-%s-,\n-%s-\n",d,s);
return 0;
}
char *strcpy(char *dest,const char *src)
{
char *tmp = dest;
while ((*dest++ = *src++) != '\0 ')
/* nothing */;
return tmp;
}
int strcmp(const char * cs,const char * ct)
{
register signed char __res;
while (1)
{
if ((__res = *cs - *ct++) != 0 || !*cs++)
break;
}
return __res;
}