Question: C programming Write a program that implements the selection sort. The program should generate n number of numbers between 0-999 randomly (no need for srand
C programming
Write a program that implements the selection sort. The program should generate n number of numbers between 0-999 randomly (no need for srand function). You should define a macro with maximum size of the array that holds the generated numbers, if user enters a value larger than n or less than 0, an error should be printed using fprintf function. You should also implement a function like macro that does swap (i.e. SWAP macro should take 3 inputs x, y and t and swap x and y). You should print the array contents which include the numbers generated before sorting and then call the function selSort() that does one swap in each i iteration and then print sorted array.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
