strcat
char *  strcat ( char * dest, const char * src );
string.h
  cplusplus.com  

Append string.
  Appends src string to dest string. The terminating null character in dest is overwritten by the first character of src. The resulting string includes a null-character at end.

Parameters.

dest
Pointer to a null-terminated string with enough space allocated to contain both src and dest.
src
Null-terminated string to append.

Return Value.
  dest is returned.

Portability.
  Defined in ANSI-C.

Example.

/* strcat example */
#include <stdio.h>
#include <string.h>

main ()
{
  char str[80];
  strcpy (str,"strings  ");
  strcat (str,"have been ");
  strcat (str,"concatenated.");
  puts (str);
  return 0;
}
Output:
strings have been concatenated.

See also.
  strcpy, strncat, strncpy


© The C++ Resources Network, 2000