08/11/01 19:16:55
>>55
#include <stdio.h>
#include <stdlib.h>
int string_length(char *s)
{
int i = 0;
while(*s++) i++;
return i;
}
int main(int argc, char *argv[])
{
char *px = argv[1];
char *py = argv[2];
int len_x = string_length(px);
int len_y = string_length(py);
int len = len_x + len_y;
char *pz = malloc(len + 1);
memcpy(pz, px, len_x);
memcpy(pz + len_x, py, len_y);
pz[len] = '\0';
puts(pz);
free(pz);
return 0;
}