strcpy() - String Handling Functions C Programming /*Write a program to copy one string into another string*/ #include #include #include void main() { char name1[20], name2[10]; printf("\nEnter the First String: "); scanf("%s",name1); printf("\nEnter the Second String: "); scanf("%s",name2); strcpy(name1,name2); printf("\n After Copied String"); printf("\n String 1 :%s",name1); printf("\n String 2 :%s",name2); getch(); } Output is as : Enter the two Names Bintu Chaudhary Bintu Chaudhary Read more » Tweet Share Share Share Share Related Post
ConversionConversion EmoticonEmoticon