Program to Illustrate “strcpy” function

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char name1[20];
char name2[20];
clrscr();
strcpy(name1,"Manish");
printf("\nName1=%s",name1);
strcpy(name2,name1);
printf("\nName2=%s",name2);
getch();
}

Leave a Reply