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