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.  
  10. t[i]='\0';
  11. return;
  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 0.01s 5288KB
stdin
abcd
stdout
s : abcd
t : abcd