fork download
  1. #include<stdio.h>
  2. #include<string.h>
  3.  
  4. main()
  5. {
  6. char first[100],middle[100],last[100],full[300];
  7. int i,f,j,m,count,mid;
  8. printf("Enter the First name : ");
  9. gets(first);
  10. printf("Enter the Middle name : ");
  11. gets(middle);
  12. printf("Enter the Last name : ");
  13. gets(last);
  14. mid=strlen(middle);
  15.  
  16. count = 0;
  17. for(i=0;first[i]!='\0';i++)
  18. {
  19. full[i]=first[i];
  20. count++;
  21. }
  22.  
  23. f=count;
  24. full[f]=' ';
  25.  
  26. for(i=0;middle[i]!='\0';i++)
  27. {
  28. full[i+count+1]=middle[i];
  29. count++;
  30. }
  31. puts(full);
  32. }
  33.  
Success #stdin #stdout 0s 10320KB
stdin
Standard input is empty
stdout

Standard output is empty