memcpy in c

[ad_1]

memcpy in c
#include 
#include 

int main () {
   const char src[50] = "http://www.tutorialspoint.com";
   char dest[50];
   strcpy(dest,"Heloooo!!");
   printf("Before memcpy dest =
   memcpy(dest, src, strlen(src)+1);
   printf("After memcpy dest =

   return(0);
}
c memcpy
int dst[ARRAY_LENGTH];
memcpy( dst, src, sizeof(dst) ); // Good, sizeof(dst) returns sizeof(int) * ARRAY_LENGTH

[ad_2]

Please follow and like us:
Content Protection by DMCA.com