Write a C Program that appends the one string to another string
1: #include<stdio.h>
2: #include<conio.h>
3: #include<string.h>
4: int main()
5: {
6: char str[100],app[20];
7: clrscr();
8: printf("Enter the string :");
9: gets(str);
10: printf("Enter the srting that you want to append : ");
11: gets(app);
12: printf("The string is : %s\n",str);
13: printf("The string you want to append is : %s\n",app);
14: printf("The string after append is : %s\n",strcat(str,app));
15: getch();
16: return 0;
17: }
No comments:
Post a Comment