strcat() string concatenate in C.

 

01  #include <stdio.h>
02 #include <string.h>
03
04 int main()
05
06 {
07 char s1[80];
08 char s2[80];
09
10 printf("Enter the first string :");
11 gets(s1);
12 printf("Enter the second string :");
13 gets(s2);
14 strcat(s1,s2);
15 puts(s1);
16
17 return 0;
18 }
 
 OUTPUT :

Enter the first string :Hello

Enter the second string :World

HelloWorld

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *