C Programming
Computer Programming

C program to concatenation two string using strcat() function



Write a program in C to concatenation two string using strcat() function

\* C program to concatenation two string using strcat() function *\

# include < stdio.h >
# include < conio.h >
# include < string.h >
int   main( )
{

char a[50], b[50] ;
printf ("\n Enter a string : " ) ;
scanf("%s", a ) ;
printf("\n Enter the string for Add : " ) ;
scanf("%s", b ) ;
strcat ( a, b ) ;
printf("\n String after concatenation = %s", a ) ;
return( 0 );

}

Output of Program :

Output of C program to concatenation two string using strcat() function