>scanf("%s",&fnamen);
fnamen is already a pointer in this context. Adding a redundant address-of operator changes the type, which can potentially break your program (though it's usually benign in this case).

Also consider that %s without a field width is no better than gets (ie. there's no protection from buffer overflow), and the result of scanf should be tested for failure:

>char fnamew[100]="";
I'd also like to point out that initializing fnamew to an empty string is absolutely critical if you're going to immediately call strcat, because strcat expects to be given a valid string. The following is broken because fnamew isn't a valid string (no null terminator):

Because of this subtlety, I often recommend using strcpy to populate the initial portion of the string, then strcat to append. Then it doesn't matter what the destination's current contents happen to be: