diff options
Diffstat (limited to '29_outname/outname.c')
-rw-r--r-- | 29_outname/outname.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/29_outname/outname.c b/29_outname/outname.c new file mode 100644 index 0000000..7cc4346 --- /dev/null +++ b/29_outname/outname.c @@ -0,0 +1,11 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include "outname.h" + +char * computeOutputFileName(const char * inputName) { + char * outFileName = malloc((strlen(inputName) + 8) * sizeof(*outFileName)); + strcpy(outFileName, inputName); + strcat(outFileName, ".counts"); + return outFileName; +} |