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