// // Task 1: Zip List // // C version. // #include #include #include #include #include #include #include "args.h" #include "parseints.h" #include "printarray.h" // zip( n1, one, n2, two, result ); // Take two arrays (one and two) and their sizes (n1 and n2), // and an empty array (result) big enough to store all n1+n2 items, // and zip them together as the task requires. // The single zipped array is left in result. void zip( int n1, int *one, int n2, int *two, int *result ) { int nr=0; int i1, i2; for( i1=0, i2=0; i1