Copy String into the another String:- Function used- strcpy .This function is used to copy string (Character Array) into another string...
Copy String into the another String:-
Function used-strcpy.This function is used to copy string(Character Array) into another string.
Q)Write a program to enter string and copy string into another string.
Note:-You can also create this program in c++(c plus plus),java,c#(c sharp) languages etc. with the same logic(Functions may be differ).
P:void main()
{
char string1[40],string2[40];
printf("Enter String");
gets(string1);
strcpy(string2,string1);
puts(string2);
getch();
}
If you have any query then leave your comments and don't forgot to follow me on Google+,Facebook,Twitter.
COMMENTS