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. }
  9. for(int p=0;t[p]!='\0';p++){
  10. s[i]=t[p];
  11. i++;
  12. }
  13. s[i]='\0';
  14. }
  15.  
  16. int main(){
  17. char s[100];
  18. char t[100];
  19. scanf("%s %s",s,t);
  20. printf("%s + %s",s,t);
  21. myStrcat(s,t);
  22. printf(" -> %s\n",s);
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 5320KB
stdin
abc def
stdout
abc + def -> abcdef