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