Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

memcpy in c

#include <stdio.h>
#include <string.h>

int main () {
   const char src[50] = "http://www.tutorialspoint.com";
   char dest[50];
   strcpy(dest,"Heloooo!!");
   printf("Before memcpy dest = %s
", dest);
   memcpy(dest, src, strlen(src)+1);
   printf("After memcpy dest = %s
", dest);
   
   return(0);
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #memcpy
ADD COMMENT
Topic
Name
1+3 =