

memcpy()                 String Function                 memcpy()




Copy one region of memory into another

#include <string.h>
cchhaarr *mmeemmccppyy(_r_e_g_i_o_n_1, _r_e_g_i_o_n_2, _n);
cchhaarr *_r_e_g_i_o_n_1; cchhaarr *_r_e_g_i_o_n_2; uunnssiiggnneedd iinntt _n;

memcpy copies n characters from region2 into region1.  Unlike the
routines  strcpy and  strncpy, memcpy copies  from one  region to
another.  Therefore,  it will not halt  automatically when it en-
counters a null character.

memcpy returns region1.

***** See Also *****

strcpy(), string functions, string.h

***** Notes *****

If region1  and region2  overlap, the  behavior of memcpy  is un-
defined.  region1 should  point to enough reserved memory to hold
n bytes of data; otherwise, code or data will be overwritten.


































COHERENT Lexicon                                           Page 1


