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