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