Question: Driver File: #define INSTRUCTOR_FILE #ifdef INSTRUCTOR_FILE #include void RecordOpinions(void); int main(void) { RecordOpinions(); return EXIT_SUCCESS; } #endif TextFile6.txt: -5 -20 60 -5 4 5 -0

C2A3E3 (6 points - Program) Exclude any existing source code files that may already be in your IDE project and add a new one, naming it Source code file C2A3E3 main-Driver.e. De nor writona.cat function main dready exists in the instructor-supplied file add instructor-supplied and it will use the code you write. File C2A3E3 Record Opinions.e must contain a function named Recordopinions. Recordopinions syntaxe void Recordopinions (void); Parameters: none Synopsis: Prompts users for their ratings of a product, counts the quantity of each rating, and displays a table of the total quantity of each rating. Return: vold Additional Recordopinions requirements/details: 1. Define macro ENDPOINT to be an arbitrary positive integer value and use it to determine the range of legal user response values, which must be from - ENDPOINT (worst) to +ENDPOINT (best). 2. Define macro TERMINATE to be an integral value outside the range of legal response values. 3. Although you are free to define additional macros if you wish it must not be necessary to explicitly change any of their values if the values associated with either ENDPOINT OF TERMINATE are changed. 4. Keep count of the quantity of each response value in the appropriate element of a type int 1-dimensional array having exactly (2. ENDPOINT + 1) elements. Do not use more than 1 array or a multidimensional array for any purpose. 5. Any In-range user response value must be used directly as the complete index value (negative or positive) into the array without going out of bounds. For example, if a user inputs an in-range value of 3 the value of the entire expression used within the square brackets to access the desired array element must also be -3. 6. Each User prompt must indicate the legal range of input values and the value needed to terminate the survey 7. If an out of range value other than the value represented by TERMINATE is entered, reject it and re-prompt the user. If the value represented by TERMINATE is entered end the survey and display a table like the one below that indicates the total number of responses for each possible rating (an ENDPOINT value of 2 was used in this example). The least significant digits of all values must be aligned for readability: Rating Responses -2 25 -1 50 @ 100 1 3 2 Manually re-rerun your program several times using various ENDPOINT. TERMINATE, and response values. Also test by redirecting input from instructor-supplied data file TestFile6.txt, which must be placed in the program's "working directory". Use ENDPOINT and TERMINATE values of 5 and 999, respectively, when using this file. Submitting your solution Send both source code files to the assignment checker with the subject line C2A3E3_ID, where ID is your 9-character UCSD student ID. See the course document titled "How to Prepare and Submit Assignments" for additional exercise formatting, submission, and assignment checker requirements. Hints: Look up the scanf function online or in any C text book to learn about its return value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
