how to copy array structs to another in c code example
Example: hwo to copy an array structs to another in c
typedef struct Person{
int phone;
char first[150];
char last[150];
char mail[150];
} person;
void person_copy(person arr1[], person arr2[], int size){
int i;
for(i=0; i<size; i++){
arr2->phone = arr1->phone;
strcpy(arr2[i].first, arr1[i].first);
strcpy(arr2[i].last, arr1[i].last);
strcpy(arr2[i].mail, arr1[i].mail);
}
}