C Program to Copy String Using Pointers

#include<stdio.h>
#include<conio.h>
void main()
{
char sk[20], csk[20], *st, *cst;
clrscr();
printf("Enter a String: ");
gets(sk);
st=sk;
cst=csk;
while((*cst++=*st++)!='\0');
printf("\nThe Copied String: ");
puts(csk);
getch();
}

Output:

C Program to Copy String Using Pointers