C++ strcat() Function
C++ strcat()
The strcat()
function concatenates a copy of source string to destination string and terminates destination string with a null.
The null terminator originally ending destination is overwritten by the first character of source string.
If the array overlap, the behavior of strcat()
is undefined.
Remember, no bounds checking takes place, so it is the programmer's responsibility to ensure that the size of the destination string variable is large enough to hold both its original contents and also those of source string.
Note: The source string (src) is untouched by the operation.
Example
Output
Syntax
Parameter Values
Value | Type | Explanation |
---|---|---|
dest | Required | Specifies the destination string. |
src | Required | Specifies the source string. |
Return Value
Value | Explanation |
---|---|
Address | Returns the pointer to the destination string. |
Reminder
Hi Developers, we almost covered 90% of String functions and Interview Question on C++ with examples for quick and easy learning.
We are working to cover every Single Concept in C++.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.