The wcsncat() function appends the characters of the source to the destination, including a terminating null wide character. If the length of the string in source is less than num. Then only the content up to the terminating null wide character is copied.
wchar_t* wcsncat (wchar_t* destination, const wchar_t* source, size_t num)
Parameters: The function accepts three mandatory parameters which are described below:
- destination: specifies the pointer to the destination array
- source: specifies the string to be added to the destination
- num: specifies the maximum number of character to be added
Return value: The function returns the destination.
Below programs illustrate the above function:
Geekforgeeks is the best
Program 2 :
only some of the letters will be copi
- Function Overloading vs Function Overriding in C++
- What happens when a virtual function is called inside a non-virtual function in C++
- fma() function in C++
- arc function in C
- exp() function C++
- log() function in C++
- div() function in C++
- set count() function in C++ STL
- map upper_bound() function in C++ STL
- set emplace_hint() function in C++ STL
- set insert() function in C++ STL
- set upper_bound() function in C++ STL
- set lower_bound() function in C++ STL
- set max_size() function in C++ STL
- set equal_range() function in C++ STL
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.