I want to copy an int array to another int array. They use the same define for length so they\'ll always be of the same length.
What are the pros/cons of the followi
If you have allocated using malloc you must state the size of the array
int * src = malloc(ARRAY_LENGTH*sizeof(*src));
int * dst1 = malloc(ARRAY_LENGTH*sizeof(*dst));
memcpy(dst1,src,ARRAY_LENGTH*sizeof(*dst));
If you have allocated with a static array you can just use sizeof
int dst2[ARRAY_LENGTH];
memcpy(dst2,src,sizeof(dst2));