C Programming Tutorial
Computer Tutorial

strcat( ) Function



strcat( ) Function

This function concatenates the source string at the end of the target string.

Program to demonstrate strcpy() function

\* C Program to demonstrate strcpy() function *\
# include < stdio.h >
int   main( )
{

char   source[ ] = "General"  ;
char   target[30] = "Note"  ;
strcat(  target, source) ;
printf(" \nsource string = %s ",  source) ;
printf(" \ntarget string = %s ",  target) ;
return ( 0 ) ;

}

Output :

source string = General
target string = GeneralNote