30 lines
434 B
C
30 lines
434 B
C
|
#include <stdio.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
int main () {
|
||
|
char src1[50], dest1[50];
|
||
|
|
||
|
strcpy(src1, "This is source");
|
||
|
strcpy(dest1, "This is destination");
|
||
|
|
||
|
strncat(dest1, src1, 10);
|
||
|
|
||
|
printf("%s", dest1);
|
||
|
|
||
|
|
||
|
printf("\n");
|
||
|
|
||
|
|
||
|
char src2[50], dest2[50];
|
||
|
|
||
|
strcpy(src2, "This is source");
|
||
|
strcpy(dest2, "This is destination");
|
||
|
|
||
|
ft_strncat(dest2, src2, 10);
|
||
|
|
||
|
printf("%s", dest2);
|
||
|
|
||
|
return(0);
|
||
|
}
|
||
|
|