#include<stdio.h> 

void string_copy(char *b,char *a)
{

while(*a!='\0')
{
*b=*a;
b++;
a++;
}
*b='\0';
}

int main()
{
char s1[50],s2[50];

printf("enter a string\n");
gets(s1);
string_copy(s2,s1);
printf("The Copied string is: ");
puts(s2);
}
     
           
Note: Need to be arranged in compiler after copied
   

 OutPut:

enter a string Hello World The Copied string is: Hello World