strcat

Navigation:  Programming language SQC > Libraries > String manipulation >

strcat

Previous pageReturn to chapter overviewNext page

The strcat() function joins two strings.

It returns the address of the destination string.

 

char* strcat(char *dst,char* src)

 

Example:

 
int main()

{

  char s1[10], s2[10];

 

  strcpy( s1, "first " );

  strcpy( s2, "second" );

  strcat( s1, s2 );

  printf( s1 );

  

  return 0;

}

 

Output:

 

  first second