Update main.c

char *temp = (char *) malloc(k + 1), *buffer = (char *) malloc(buff);