Question: Write down a program in C that should do the following: 1. Accept a user input for the size of data 'n' from the user.

 Write down a program in C that should do the following:

Write down a program in C that should do the following: 1. Accept a user input for the size of data 'n' from the user. 2. Randomly generate 'n' integers in the range 0 to 9. 3. Save the randomly generated integers in a file called 'data.txt'. 4. Read the input file 'data.txt' and generate the frequency count of the integers in this file. Frequency count means the number of occurrences of each integer in the data. 5. Create a new file 'output.txt'. In this file write down the result of frequency count from step 4. 6. Make use of the frequency count in step 4 to sort the data in the file 'data.txt' in ascending order. 7. Write down the sorted data in the output file output.txt after the frequency count. if you generated the following data: 2, 8, 9, 2, 7, 6, 5, 2, 9, 3, 3, 2, 5, then the data.txt file should have frequency count like

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!