#include<stdio.h>
#include<conio.h>
int Copy(char st1[], char st2[])
int i;
for(l=0;st2[i];i++);
st1[i]=st2[i];
{
st1[i]=0;
}
void main ()
{
char st1[100], st2[100];
clrscr();
printf("Enter first string: ");
scanf("%s", st1);
printf("Enter second string: ");
scanf("%s", st2);
copy(st1,st2);
printf("\nfirst string is: %s",st1);
printf("\nsecond string is: %s",st2);
getch ();
}
No comments:
Post a Comment