fork download
  1. # include <stdio.h>
  2.  
  3. void myStrcat(char s[], char t[]){
  4. int i=0;
  5. while(s[i]!='\0'){
  6. i++;
  7. }
  8. for(int l=0;t[l]!='\0';l++){
  9. s[i+l]=t[l];
  10. }
  11. }
  12.  
  13. int main(){
  14. char s[100];
  15. char t[100];
  16. scanf("%s %s",s,t);
  17. printf("%s + %s",s,t);
  18. myStrcat(s,t);
  19. printf(" -> %s\n",s);
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5272KB
stdin
abc def
stdout
abc + def -> abcdef