Namespaces
Variants
Views
Actions

strcpy

From cppreference.com
< c‎ | string‎ | byte
Revision as of 13:48, 10 April 2013 by P12 (Talk | contribs)

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <string.h>
</td>

<td></td> <td></td> <tr class="t-dcl ">

<td >
char *strcpy( char          *dest, const char          *src );
</td>

<td class="t-dcl-nopad"> </td> <td > (until C99) </td> </tr> <tr class="t-dcl ">

<td >
char *strcpy( char *restrict dest, const char *restrict src );
</td>

<td class="t-dcl-nopad"> </td> <td > (since C99) </td> </tr> Template:ddcl list end

Copies the byte string pointed to by src to byte string, pointed to by dest.

If the strings overlap, the behavior is undefined.

Contents

Parameters

dest - pointer to the byte string to copy to
src - pointer to the null-terminated byte string to copy from

Return value

dest

Example

See also

Template:c/string/byte/dcl list strncpyTemplate:c/string/byte/dcl list memcpy