Question: C language In the main function, create a local array variable to store exactly 10 numbers of float type . The main function asks the
C language
In the main function, create a local array variable to store exactly 10 numbers of float 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 same4fun. This function has to do the following:
1. Compare the third 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 equal to the third 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 equal to the third 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
Get step-by-step solutions from verified subject matter experts
