Modify the program to read in any number of candidates from the file, instead of just 11.
In order to do this, you will have to modify your code for reading in candidate names so that it reads names until the end of the file where the candidate names are stored is reached. As each name is read, it should be stored in the next element of the array.
Note that you will also need to keep a running count of the number of names read in, which will allow you to know the total number of names that you have read. You will need to use this in your for statements later in the program, in order to make sure that you print/search all of the candidates names.
You may assume that the file contains no more than 20 names (that is, you may declare your arrays to be of size 20).
Modify the program to determine the size of the vote array (that is, the array of ints that you use to keep track of the number of votes for each candidate) dynamically.
In order to do this, first prompt the user for the number of candidates. Then use that number to create a new array of that many ints.
Keep in mind that you will have to change the votes array to use pointer form instead.
Do not worry about modifying the array of candidate names, as dynamic allocation of 2D arrays is much more complicated.
Your program should currently prompt the user for the name of the file where the candidate names are stored.
Modify it to take this information as a command line argument instead. That is, if the program were run as:
a.out candidates.dat
the program should read the candidate names from the file candidates.dat.