diff --git a/concat_in_c b/concat_in_c new file mode 100644 index 0000000..a9794f7 --- /dev/null +++ b/concat_in_c @@ -0,0 +1,17 @@ +#include +#include +#include + +char *main(int ac, char **av) +{ + char *str; + + if (ac == 3) + { + str = malloc(strlen(av[1]) + strlen(av[2]) + 1); + strcpy(str, av[1]); + strcat(str, av[2]); + printf("%s\n", str); + } + return (NULL); +}