[Solved]Write C Program Following Accepts Positive Integer N Keyboard Create Character Array Size Q37300748
Write a C++ program that does the following :
Accepts a positive integer ( n ) from the keyboard . Create ancharacter array of size n. Using a random number generator,populate the array with characters between 33 – 126. Create 7individual functions and perform the following
1. In the first function: display elements of the array. Displaythe first 20 elements If the size is > 20
2. In the second function : Using recursion, Search for a char (80 ) in the array using sequential search and at the end displaynumber of comparisons it makes.
3. In the third function : Sort the original array usingselection Sort and at the end display the number of swaps it makes.Display elements of the array.
4. In the fourth function : Sort the original array usinginsertion Sort and at the end display the number of comparisons itmakes.
5. In the fifth function : Sort the original array using QuickSort and at the end display the number of recursion calls it makes.Use the next to the middle value as a pivot value.
6. In the sixth function : Sort the original array using QuickSort and at the end display the number of recursion calls it makes.Use the first value as a pivot value. Display elements of thearray.
7. In the last function : Sort the original array using QuickSort and at the end display the number of recursion calls it makes.Use the last value as a pivot value. Display elements of thearray.
8. For each of the preceding steps ( 2 thru 7 ), calculate andprint the CPU time before each step starts and after each completedstep then calculate actual time for the completion of each step.Time should be displayed in seconds and milliseconds Displayelements of the array. Display the first 20 elements If the size is> 20
Expert Answer
Answer to Write a C++ program that does the following : Accepts a positive integer ( n ) from the keyboard . Create an character a… . . .
OR

