void generate(int *arr,int num) { srand((int)time(0)); for(int i= 0; i<num;i++){ arr[i] = rand(); } }