The conditional in your for loops looks wrong to me, shouldn't you be checking for a terminating zero at the current index position rather than the whole thing?
Something like:
for(i=0;fn[i]!='\0';i++)
name[i]=fn[i];
puts(name);
for(j=0;sn[j]!='\0';j++)
name[i+j+1]=sn[j];
name[i+j+1]=' ';
for(k=0;ln[k]!='\0';k++)
name[i+j+k+2]=ln[k];
name[i+j+k+2]='\0';