Question: Assignment 3 - Part Two ( Term Project Part 1 ) : Create a function to capture the processor time. Please look up how to

Assignment 3- Part Two (Term Project Part 1):
Create a function to capture the processor time. Please look up how to use clock() function provided by time.h.(very simple).
What do you need to submiss your Project Part 1?
queue.h, queue.c, sorting.h, sorting.c, and bigOExperiment.c
You can use queue.h and queue.c class examples code from your first half.
Sorting.h includes the functions below -
a. Bubble sort function
This function performs sorting of an array in ascending order using bubble sort algorithm.
b. Selection sort function
This function performs sorting of an array in ascending order using selection sort algorithm.
c. Swap function
This function swaps the content of two variables.
d. arrayGenerator
This array generator generates an array with user specified size.
For example, arrayGenrtator(n), this function will create an
For example, arrayGenrtator(n), this function will create an array contains the size of n random numbers.
e. markTime
Whenever calls this function, the processor time will be captured. The captured time is the number of clock ticks that have elapsed from the start of the program's execution up to the point where the clock 0 function is called.
f. clockTickToTime
This function converts the clock ticks to hours, minutes, and second format (hh:mm:ss).
4. bigOExperiment.c
This is an application program that creates an array containing one million random numbers ascending sorting on this array using bubble sort. It will report the time taken for this action.
Marking scheme
\table[[Task 1,Mark],[queue.h/queue.c,1],[Sorting.h/sorting.c,2],[bigOExperiment.c,2],[Total,5]]
 Assignment 3- Part Two (Term Project Part 1): Create a function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!