<title>memcpy function</title>
<head>
<script language="JavaScript">
</script>
</head>
<body bgcolor=#ffffcc>
<hr>
<center>
<h1>memcpy function</h1>
</center>
<hr>
<p>
<b>memcpy</b> copies data between two memory locations. This function will copy the
supplied number of bytes
stored at the location pointed to by 's2' to the location pointed to by 's1'.
<p>
<center>
<table border=2 width="80%" bgcolor="ivory">
<tr><td>
<pre>
s1 s2
| |
V V
- - - - ---------------
| | | | | | a | b | c | d |
- - - - ---------------
^ ^ | |
| | | |
-|------------- |
------------------
</pre>
</td></tr>
</table>
</center>
<p>
<hr>
<h2>Prototype</h2>
<center>
<table border=2 width="80%" bgcolor="ivory">
<tr><td>
<pre>
Library: string.h
Prototype: char memcpy(void *s1, void *s2, int num);
Syntax:
float data1;
char data2[64];
memcpy(data1, data2, sizeof(data2));
</pre>
</td></tr></table></center><p>
<hr>
<h2>Notes</h2>
This is a handy function for moving data between data types
<h2>See also:</h2>
<img src="../../GRAPHICS/whiteball.gif">
<a href="strtok.html>strtok"</a>
<br>
<img src="../../GRAPHICS/whiteball.gif">
<a href="strncpy.html">strncpy</a>
<br>
<img src="../../GRAPHICS/whiteball.gif">
<a href="strcpy.html">strcpy</a>
<br>
<img src="../../GRAPHICS/whiteball.gif">
<a href="sprintf.html">sprintf</a>
<br>
<img src="../../GRAPHICS/man.gif">
<a href="../MAN/strcat.htm"><i>strcat</a>
<br>
<img src="../../GRAPHICS/whiteball.gif">
<a href="../CONCEPT/string.html">strings</a>
<br>
<img src="../../GRAPHICS/whiteball.gif">
<a href="../FUNCTIONS/memcpy.htm">memcpy</a> Copy data from one memory location to another.
<p>
<hr>
<p>
<center>
<table border=2 width="80%" bgcolor="ivory">
<tr align=center>
<td width="25%">
<a href="../index.htm"> Top</a>
</td><td width="25%">
<a href="../master_index.html"> Master Index</a>
</td><td width="25%">
<a href="../SYNTAX/keywords.html"> Keywords</a>
</td><td width="25%">
<a href="funcref.htm"> Functions</a>
</td>
</tr>
</table>
</center>
<p>
<hr>
<address><a href="../../address.html">Martin Leslie</a>
</address><p>
</body>
</html>
| file: /Techref/language/ccpp/cref/functions/memcpy.htm, 2KB, , updated: 2003/3/20 10:39, local time: 2012/5/25 05:37,
38.107.179.234:LOG IN |
| ©2012 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://www.piclist.com/techref/language/ccpp/cref/functions/memcpy.htm"> memcpy function</A> |
| Did you find what you needed? |
|
Editor, assembler, disassembler and simulator w/ virtual component "plugins" (LED,LCD,key,motor,TV,etc). |
.