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
It depends. Both arr and pointer are arrays, but sizeof() returns only the correct size for arr, which is declared at compile time.
int main() {
int arr[10];
int * pointer;
pointer = (int *) malloc(10 * sizeof(int));
printf("%d\n", sizeof(arr)); // 40
printf("%d\n", sizeof(pointer)); // 4 or 8
free(pointer);
}