Question
Write and test a C program, save it as PRG2Ta1.C . Your program must have a comment line that contains your full name and your
Write and test a C program, save it as PRG2Ta1.C. Your program must have a comment line that contains your full name and your student number.
In the main function, create a local array variable to store exactly 9 numbers of double type. The main function asks the user to enter random (non-sorted) numbers to fill the array. Now, the main function must pass the array to a function called big4fun. This function has to do the following:
1. Compare the last element of the array with all other elements of the array.
2. Count how many values of all other elements of the array that are greater than the last element's value. If it cannot find any, return -1 to indicate that no such values are found. Otherwise, return the number of such values of other elements of the array that are great than the last element's value.
After having received the information from the function, the main function has to print a short message to tell the user the result.
Before ending the program, print "Press any key to continue ...", wait for the user to hit any key and exit.
If the program works, copy one test screen output and place it at the end of the C file as multiline comments within /* */.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started