Question: 1. (40 points) Learn the example C program in Folio consisting of three files (a.c, a.h, main.c) and complete this exercise. You need to understand

 1. (40 points) Learn the example C program in Folio consisting

1. (40 points) Learn the example C program in Folio consisting of three files (a.c, a.h, main.c) and complete this exercise. You need to understand function and pointer and know the selection sorting algorithm. Write a c program that consists of three files mysort.h, mysort.cand my Main. c. Below is the mysort.h prototype #include #include void generateNumstint myarr, int len: void sortNums(int myarr, int len): mysort.h must contain only the function declarations (prototypes) listed above . generateNums function should generate len random integers in the range 0-100 inchisive (use rand function in ) in the supplied array myarr,Its definition should be in mysort.c .sortNums function should sort the len integers at myarr into ascending order using selection sort. Its definition should be in mysort.c, Note that the caller of sortNums and generateNums should pass vald pointers myarr to them. a. In myMain.c you need to write your main function that calls the two functions in mysort.h to generate N random integers in the range 0-10 inclusive and then print out the generated unsorted random numbers in one line with suitable separators between them and the sorted N numbers in another line, Your program should get N (which represents the number of random integers you will generate and sort) from the first command line argument (1e, argv 1 1) of this C program (you can use the atof function; see example code LeapYear cmdline.c). Upload all three source files. 137 points) b. Supply a mskefile to compile your program. When you submit your makefile to Folio, be aware of the file name issue regarding Folio complaint. See the last slide of 3 Pointers Functions pptx for details. Make sure you have tested that your makefile works. (3 points)

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!