Question: Assignment 3 - Part Two ( Term Project Part 1 ) : Create a function to capture the processor time. Please look up how to
Assignment Part Two Term Project Part :
Create a function to capture the processor time. Please look up how to use clock function provided by time.hvery simple
What do you need to submiss your Project Part
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, arrayGenrtatorn this function will create an
For example, arrayGenrtatorn this function will create an array contains the size of 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 function is called.
f clockTickToTime
This function converts the clock ticks to hours, minutes, and second format hh:mm:ss
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
tableTask MarkqueuehqueuecSortinghsortingcbigOExperimentcTotal
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
