strcat, _fstrcat
raw OCR
Appends one string to another.
Defined in header <string.h>
Syntax
#include <string.h>
Near version: char *strcat(char *dest, const char *src);
Far version: char far * far _fstrcat(char far *dest, const char far *src)
Portability
| DOS | UNIX | Windows | ANSI C | C++ only | |
|---|---|---|---|---|---|
| Near version | ■ | ■ | ■ | ■ | |
| ■ | ■ |
Remarks
strcat appends a copy of src to the end of dest. The length of the resulting string is strlen(rf^sO + strlen(src).
Return value
strcat returns a pointer to the concatenated strings.
Example
#include <string.h>
#include <stdio.h>
int main (void)
{
char destination[25] ;
char *blank = " ", *c = "C++' *turbo = "Turbo";
strcpy (destination, turbo);
strcat (destination, blank);
strcat (destination, c);
printf ("%s\n", destination);
return 0;
Differences from modern implementations
Nothing recorded yet.
Modern references
These are search links, not yet checked by hand.
Extraction notes
- heading `strcat, fstrcat` read as `strcat, _fstrcat`
Stable link: /3.1/string.h/strcat/
· short form /3.1/strcat/