summaryrefslogtreecommitdiff
path: root/reference/C/FUNCTIONS/memcpy.htm
diff options
context:
space:
mode:
Diffstat (limited to 'reference/C/FUNCTIONS/memcpy.htm')
-rw-r--r--reference/C/FUNCTIONS/memcpy.htm118
1 files changed, 118 insertions, 0 deletions
diff --git a/reference/C/FUNCTIONS/memcpy.htm b/reference/C/FUNCTIONS/memcpy.htm
new file mode 100644
index 0000000..d2dafe8
--- /dev/null
+++ b/reference/C/FUNCTIONS/memcpy.htm
@@ -0,0 +1,118 @@
+<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="../cref.html"> 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>Martin Leslie
+</address><p>
+</body>
+</html>