From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/FUNCTIONS/memcpy.htm | 118 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 reference/C/FUNCTIONS/memcpy.htm (limited to 'reference/C/FUNCTIONS/memcpy.htm') 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 @@ +memcpy function + + + + + + +
+
+

memcpy function

+
+
+

+memcpy 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'. + +

+

+ + +
+
+
+     	s1		s2
+	|		|
+	V		V
+        - - - -		---------------	
+       | | | | |       | a | b | c | d |
+        - - - -		---------------	
+	^ ^		|    |
+	| |		|    |
+	 -|-------------     |
+	   ------------------
+
+
+
+

+


+ +

Prototype

+ +
+ +
+
+    Library:   string.h
+
+    Prototype: char memcpy(void *s1, void *s2, int num);
+
+    Syntax:
+               float data1;
+               char  data2[64];
+               
+               memcpy(data1, data2, sizeof(data2));
+
+

+


+ +

Notes

+ +This is a handy function for moving data between data types + +

See also:

+ + + +
+ + +
strncpy +
+ + +strcpy +
+ + +sprintf +
+ + +strcat +
+ + +strings +
+ + +memcpy Copy data from one memory location to another. + +

+ +


+

+

+ + + + +
+ Top + + Master Index + + Keywords + + Functions +
+
+

+


+
Martin Leslie +

+ + -- cgit v1.2.3-54-g00ecf