//Koen Noens, sept 2002 // oefening pointer : herschrijf arrayinvoegen.cpp m.b.v. pointers #include void sort_merge(int*p1, int max1, int* p2, int max2, int* pRes); void opscherm(int* p, int max); void main() { const int max1 = 6; const int max2 = 9; const int max3 = max1+max2; int arr1[]={1,5,6,7,12,14}; int arr2[]={2,4,10,18,19,20,34,36,40}; int arrSamengevoegd[max3]; // samenvoegen sort_merge(arr1,max1,arr2, max2, arrSamengevoegd); //output cout << "Array 1 : \t\t"; opscherm(arr1,max1); cout <<"Array 2 : \t\t" ; opscherm(arr2,max2); cout <<"samen, gesorteerd : \t"; opscherm(arrSamengevoegd,max3); } void sort_merge(int*p1, int max1, int* p2, int max2, int* pRes) { /* * * Samenvoegen van 2 (gesorteerde) arrays tot 1 gesorteerde array, * waarbij * p1 verwijst naar array 1 index 0 tot