#include<string.h>
main()
{
    char s1[50],s2[50];
    int i=0;
    printf("enter a string\n");
    gets(s1);
    while(s1[i]!='\0')
    {   s2[i]=s1[i];
        i++;
    }
    s2[i]='\0';
    printf("The copied string is:\n");
    puts(s2);


}
     
           
Note: Need to be arranged in compiler after copied
   

 OutPut:

enter string 1 Hello the string 2 is Hello