A C program to copy the contents of one string to another using a pointer method is:

#include
#include
#include
#define length 50

void main()
{
char *s1,*s2,c;
int i=0;
clrscr();
s1=(char*)malloc(length*sizeof(char));
s2=(char*)malloc(length*sizeof(char));
printf("enter string\n");
gets(s1);
while((c=*(s1+i))!='\0')
{
s2[i]=c;
i++;
}
s2[i]='\0';
printf("Copied string is\n");
printf("%s",s2);
getch();

}