#include<stdio.h>
#include<string.h>intmain(){chara[20],b[20];printf("———————————————————————————————————————————");printf("\nProgram to concatenate the two strings");printf("\n———————————————————————————————————————————");printf("\nEnter the 1st string ");scanf("%s",a);printf("\nEnter the 2nd string ");scanf("%s",b);strcat(a,b);printf("\nThe concatenated string is %s",a);printf("\n———————————————————————————————————————————\n");return0;}
Output
kodingwindow@kw:~$ gcc kw.c kodingwindow@kw:~$ ./a.out
———————————————————————————————————————————
Program to concatenate the two strings
———————————————————————————————————————————
Enter the 1st string KODING
Enter the 2nd string WINDOW
The concatenated string is KODINGWINDOW
———————————————————————————————————————————
kodingwindow@kw:~$
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.