// Copied and fixed the code from goo.gl/EMpzYz #include #include #include int main(){ //Allows you to generate random number srand(time(NULL)); // Allows user to specify the original array size, stored in variable n1. printf("Enter original array size:"); int n1=0; scanf("%d",&n1); //Create a new array of n1 ints int* a1 = malloc(sizeof(int) * n1); int i; for(i=0; i