Program to copy one string to other using library function


#include<stdio.h>
#include<conio.h>
#include<string.h>

main()
{
 char str1[25],str2[25];
 clrscr();

 printf(" enter the string\n");
 gets(str1);

 strcpy(str2,str1);

 printf("\n the copied string is \n");
 puts(str2);

 getch();
 }

0 comments:

Post a Comment