What's wrong with it?
It might be that you're overflowing the buffer, since you're using strcat() which doesn't know the size of your string buffer.
Type: Posts; User: cpjust
What's wrong with it?
It might be that you're overflowing the buffer, since you're using strcat() which doesn't know the size of your string buffer.
In that case, you shouldn't use strcat() since that appends a whole string instead of a single character.
I haven't finished my coffee yet, but I believe this should work:
size_t len = strlen(...
Are you trying to append a single character there, or do you want the whole string beginning at position n?
strcat(str1,c[n]);
You're passing a char here instead of a char*