Question: Problem 1: Working with Arrays (70 points) Create a program proj4_1.cpp that reads a list of integers from a file (given below) into an array
Problem 1: Working with Arrays (70 points)
Create a program proj4_1.cpp that reads a list of integers from a file (given below) into an array of type integer. numbers.txt (click to download)

The file can contain up to 50 numbers which means that you should use a partially filled array like example on page 536. Your program should call a function to sort the array in descending order, from highest to lowest. This function should have two parameters: the array of integers and the last used index. For example, if the file has 42 numbers, then the last used index should be 41. The sort function should not sort the entire array, only up to the last used index.
Finally, your program should call another function to display the frequency of numbers (count of occurrences) in the array. For example, if the input array from file is,
-12 3 -12 4 1 1 -12 1 -1 1 2 3 4 2 3 -12
the output should be,
N Count 4 2 3 3 2 2 1 4 -1 1 -12 4
Important: your program will be tested with files containing different sequences of integers.
FILE :
- 15
2
3
7
- 9
11
2
3
- 4
- 11
5
4
7
- 9
- 15
1
9
2
- 4
- 6
- 7
8
5
- 16
6
3
- 4
- 7
12
2
- 9
5
17
- 18
3
2
- 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
