Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C++ Programming/Code/Standard C Library/Functions/strcat

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

strcat #include <cstring> char *strcat( char *str1, const char *str2 ); The strcat() function concatenates str2 onto the end of str1, and returns str1. For example: printf( "Enter your name: " ); scanf( "%s", name ); title = strcat( name, " the Great" ); printf( "Hello, %s\n", title ); ; Note that strcat() does not perform bounds checking, and thus risks overrunning str1 or str2. For a similar (and safer) function that includes bounds checking, see strncat(). Related topics strchr - strcmp - strcpy - strncat