Puedes usar memcpy. Hace justamente lo que pides.
Ejemplo:
#include <stdio.h>
#include <string.h>
int main() {
int array_origen[8] = {1, 2, 3, 4, 5, 6, 7, 8};
int array_destino[4] = {0};
for(int i = 0; i < 4; ++i)
printf("array_destino[%i] = %i\n", i
, array_destino
[i
]);
puts("\nCopia del array\n"); memcpy(array_destino
, array_origen
, sizeof(int) * 4);
for(int i = 0; i < 4; ++i)
printf("array_destino[%i] = %i\n", i
, array_destino
[i
]); }
Resultado:
array_destino[0] = 0
array_destino[1] = 0
array_destino[2] = 0
array_destino[3] = 0
Copia del array
array_destino[0] = 1
array_destino[1] = 2
array_destino[2] = 3
array_destino[3] = 4