strcat() Function in C++ Last Updated : 04 Apr, 2024 Comments Improve Suggest changes Like Article Like Report The strcat() function in C++ is a predefined function in the <cstring> header file that is used to concatenate two strings, by appending a copy of the source string to the end of the destination string. This function works by adding all the characters till the null character of the source string at the position where the null character is present in the destination string. Due to this, strcat() can only be used on null-terminated strings (Old C-Style Strings). Syntax of strcat() in C++char *strcat(char *destination, const char *source);Parameters of strcat() in C++destination: It is a pointer to the destination string. It should be large enough to store the concatenated string.source: It is a pointer to the source string which is appended to the destination string.Return Value of strcat() in C++The strcat() function returns a pointer to the destination string. String Concatenation in C++Example to Use strcat() in C++Input: src = "GeeksforGeeks is an" dest = "Online Learning Platform" Output: GeeksforGeeks is an Online Learning PlatformThe below example illustrates how we can use strcat() function to concatenate or append two strings in C++. C++ // C++ Program to use strcat() function to concatenate two // strings in C++ #include <cstring> #include <iostream> using namespace std; int main() { // C-style destination string char dest[50] = "GeeksforGeeks is an"; // C-style source string char src[50] = " Online Learning Platform"; // concatenating both strings strcat(dest, src); // printing the concatenated string cout << dest; return 0; } OutputGeeksforGeeks is an Online Learning PlatformNote: The behavior of strcat() is undefined if the destination array is not large enough to store the contents of both source and destination string, or if the strings overlap. There is also a function similar to strcat() which only appends the given number of characters from the source string to the destination string. It is strncat(). Comment More infoAdvertise with us Next Article strcat() Function in C++ susobhanakhuli19 Follow Improve Article Tags : C++ cpp-string CPP-Functions CPP Examples Practice Tags : CPP Similar Reads strol() function in C++ The strtol() function in C++ interprets the contents of a string as an integral number of the specified base and return its value as a long int.This function also sets an end pointer that points to the first character after the last valid numeric character of the string, if there is no such characte 3 min read std::function in C++ The std::function() in C++ is a function wrapper class which can store and call any function or a callable object. In this article, we will learn about std::function in C++ and how to use it in different cases.Table of ContentWhat is std::function in C++?Example of std::functionMember Functions of s 5 min read strtod() function in C/C++ The strtod() is a builtin function in C and C++ STL which interprets the contents of the string as a floating point number and return its value as a double. It sets a pointer to point to the first character after the last valid character of the string, only if there is any, otherwise it sets the poi 4 min read scalbn() function in C++ The scalbn() function is defined in the cmath header file. This function is used to calculate the product of given number x and FLT_RADIX raised to the power n. Syntax:- float scalbn(float x, int n); or double scalbn(double x, int n); or long double scalbn(long double x, int n); or double scalbn(int 2 min read strtoumax() function in C++ The strtoumax() function in C++ interprets the contents of a string as an integral number of the specified base and return its value as an uintmax_t(maximum width unsigned integer). This function also sets an end pointer that points to the first character after the last valid numeric character of th 4 min read Like