C Program for FUNCTION OF COPY ONE STRING IN OTHER STRING
#include stdio.h>
#include conio.h>
int copy(char a[],char b[]);
void main()
{
char a[100],b[100];
int i;
clrscr();
printf("ENTER THE FIRST STRING: ");
gets(a);
printf("ENTER THE SECOND STRING: ");
gets(b);
copy(a,b);
getch();
}
int copy(char a[],char b[])
{
int i;
for(i=0;a[i]!='\0';i++)
{
a[i]=b[i];
}
a[i]='\0';
printf("THE FIRST STRING IS COPY AND PUT INTO B= %s",a);
}
OUTPUT :
ENTER THE 1 STRING: KAMLESH
ENTER THE 2 STRING: MENGAR
THE FIRST IS COPY AND PUT INTO B = MENGAR