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