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