/* use of strcpy() */
main()
{
str1[15];
char str2[15];
printf("Enter the string");
scanf("%s",&str2);
strcpy(str1,str2);
printf("The first string = %s \t and second string =%s \n ",str1,str2);
strcpy(str1,"Uttar");
strcpy(str2,"Pradesh");
printf("The first string = %s \t and second string =%s \n",str1,str2);
0;
}
|