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