Question: All in C code 1. Write a function named exchange that is used to convert some amount of mixed change to the equivalent number of
1. Write a function named exchange that is used to convert some amount of mixed change to the equivalent number of cents. The function takes 5 integer parameters representing the number of dollars, quarters, dimes nickels, and pennies, and returns the integer total value of all the change in cents. Write the C statements that could be added to the main function to define data needed for Problem #1. Call the exchange function, passing the data as parameters. Display the returned result. Additional question: could a version of this function be written that does the opposite (takes some number of cents and returns the number of dollars, quarters, dimes, etc.)? Explain your answer. 2. Write a function named count Blanks that counts and returns the integer number of blank spaces that appear in a string provided as a parameter. (Recall that a blank space is a character: 3. Write the C statements that could be added to the main function to define a string named sentence that could be used for Problem #3, using your choice of words. Call the function countBlank, passing sentence as a parameter. Display the returned result. 4. Define a function named biggest that locates and returns the largest value in a 1-d array of floating point values that is provided as a parameter. Is there anything else that should be provided in the parameter list in order to complete this task? 5. Write the C statements that could be added to the main function to declare a 1-d array of float named miles of length 4 that could be used for Problem #5. Initialize the array using your choice of values. Call the function biggest, passing necessary parameter(s), and display the returned result. 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
