fork download
  1.  
  2.  
  3. #include<stdio.h>
  4.  
  5. int main(){
  6. char s1[20],s2[20];
  7. int i=0;
  8. printf("enter your name \n");
  9. gets(s1);
  10. gets(s2);
  11. while(s2[i]!='\0')
  12. {
  13. s1[i]=s2[i];
  14. i++;
  15. }
  16. printf("copied name in s1 is ");
  17. puts(s1);
  18.  
  19. }
Success #stdin #stdout 0s 2252KB
stdin
hello
!@#$%^&()
stdout
enter your name 
copied name in s1 is !@#$%^&()