1int dst[ARRAY_LENGTH];
2memcpy( dst, src, sizeof(dst) ); // Good, sizeof(dst) returns sizeof(int) * ARRAY_LENGTH
1#include <stdio.h>
2#include <string.h>
3
4int main () {
5 const char src[50] = "http://www.tutorialspoint.com";
6 char dest[50];
7 strcpy(dest,"Heloooo!!");
8 printf("Before memcpy dest = %s\n", dest);
9 memcpy(dest, src, strlen(src)+1);
10 printf("After memcpy dest = %s\n", dest);
11
12 return(0);
13}