Syntax
#include <wchar.h> wchar_t *wcscat(wchar_t *string1, const wchar_t *string2);Description
wcscat appends a copy of the string pointed to by string2 to the end of the string pointed to by string1.
wcscat operates on null-terminated wchar_t strings. The string arguments to this function should contain a wchar_t null character marking the end of the string. Boundary checking is not performed.
wcscat returns a pointer to the concatenated string1.
This example creates the wide character string "computer program" using wcscat.
#include <stdio.h> #include <wchar.h> #define SIZE 40 int main(void) { wchar_t buffer1[SIZE] = L"computer"; wchar_t *string = L" program"; wchar_t *ptr; ptr = wcscat(buffer1, string); printf("buffer1 = %ls\n", buffer1); return 0; /**************************************************************************** The output should be: buffer1 = computer program ****************************************************************************/ }Related Information