This preview shows page 1. Sign up to view the full content.
Unformatted text preview: to sort. Then, the program should create an array of integes that size, populate it with random numbers, and print out the array. The program then calls a function sort(int a[ ], int size) to sort the array, this function should take an array of integers and the size of an array as parameters. Once the array is sorted, the main program should print the sorted array. The function sort(int a[ ], int size) should create the rst Quicksort thread. Think carefully about the following issues, and then make the best decision in your program: (1) Does the sort function have to join the rst Quicksort thread that is cre-ated? (2) Does each Quicksort thread have to join neither, one, or both of the Quick-sort threads that it creates? 1...
View Full Document
This document was uploaded on 10/15/2010.
- Spring '09