fork download
  1. # include <stdio.h>
  2.  
  3. void myStrcpy(char s[], char t[])
  4. {
  5. for(int i=0;i<100;i++)
  6. {
  7. t[i]=s[i];
  8. }
  9.  
  10. return 0;
  11. }
  12.  
  13. int main()
  14. {
  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 5284KB
stdin
abcd
stdout
s : abcd
t : abcd