#include <stdio.h>
#include <stdlib.h>
#include <string.h>

void dosomething(size_t c, char* s);
const char *dummy = "1234567890";
const char* inlet = "_";

int main(void) {
    for(int i = 0; i < 10; i++) {
        char *s = calloc(11,1);
        strcpy(s, dummy);
        dosomething(1, s);
        free(s);
    }
    return 0;
}

void dosomething(size_t c, char* s){
    printf("%s\n", s);

    if (c < 10) {
        char *ns = calloc(11,1);
        strncpy(ns, s, c -1);
        strncat(ns, inlet, 1);
        strcat(ns, &s[c]);
        dosomething(c+1, ns);
        free(ns);
    }
}