Here we copy one string into another string without any use of predefined function.
program-
#include< stdio.h>
int main()
{
char ch1[20],ch2[20];
int i=0;
//input of string
printf("Enter string\n");
scanf("%s",&ch1);
//Now copy in another
while(ch1[i]!='')
{
ch2[i]=ch1[i];
i++;
}
ch2[i]='';
printf("String After copy is %s",ch2);
}
Enter string
Myprogramming
String After copy is Myprogramming