Here is my code :
char *name, name_log=\"log-\";
------getting \'name\' from user-----
strcat(name_log, name); char ext[] =
you need to allcocate memory. You cannot add to a string in this way as the string added goes to memory which hasnt been allocated.
you can do
char[20] strarray; strcat(strarray, "log-"); strcat(strarray, "abcd");