A pointer to a wide-character string, where each element is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets.
A pointer to a wide-character string, where each element is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets.
1st Parameter
Pointer to the destination buffer where the wide-character string will be copied. The buffer must be large enough to hold the source string, including the null terminator.
2nd Parameter Type : const wchar_t *
A pointer to a read-only wide-character string, where each character is of type `wchar_t`. Used for representing text in wide-character encoding to support extended character sets, such as Unicode. The string is null-terminated, with the terminator being a `wchar_t` with value 0.
2nd Parameter
Pointer to the source null-terminated wide-character string to be copied.
Read more about parameters of wcscpy in parameters section
The wcscpyfunction in C language Copies a wide character string to another wide character string.
wcscpy copies the wide character string pointed to by src, including the terminating null wide character, to the array pointed to by dest. The strings may not overlap, and the destination string dest must be large enough to receive the copy.
The wcscpyfunction takes 2
parameters:
•
wchar_t * `dest`: Pointer to the destination buffer where the wide-character string will be copied. The buffer must be large enough to hold the source string, including the null terminator.
•
const wchar_t * `src`: Pointer to the source null-terminated wide-character string to be copied.
Copies the null-terminated wide-character string `src` into the buffer `dest`. The destination string will also be null-terminated. The behavior is undefined if the destination buffer is not large enough to hold the source string, or if the source and destination overlap. Returns a pointer to `dest`.
The wcscpy function return value :
Returns a pointer to the destination string dest
Output
This example demonstrates the basic usage of wcscpy to copy a wide character string from src to dest.