Question
Provides general specifications for 9 short array processing algorithms to be written as separate functions and tested in a single program Of course, you'll
Provides general specifications for 9 short array processing algorithms to be written as separate functions and tested in a single program
Of course, you'll have to write a program to test each function and make sure to include function specific documentation too! Some of the nine shorter function related algorithms listed in Practice Set A may not need you to include any input or output!
After trying a few of the short function related algorithms listed in Practice Set A, next attempt a few of the larger programming challenges. They are a good way to gradually build up your confidence and skills that you may already have with arrays and should be helpful with the programming segment in assignment 4.
Although these challenges are to practice writing algorithms to process homogenous data using single dimensional arrays that are passed as array parameters to functions, I am also taking this opportunity to provide a few of these challenges for extra credit.
NOTE:Make sure all programmer created functions adhere to the \"Forward Declaration concept\" (i.e.., declare first and define after) and must include the following: (1) Function prototypes with or without parameters declared first and listed directly above the main (2) Function definitions listed directly below and after the main function (3) Function specific documentation such as data flow comments for each parameter in all function prototype and function heading parameter lists (4) a detailed description above each function definition as well as pre and post condition comments included in the description or listed after the function heading.
Practice Set A: Nine short array processing related algorithms to be written as separate functions and tested in a single test driver program (Select any 3 of the 9) Write a function named noNegatives...). It should accept an array of integers and a size argument. It should return true if none of the values are negative. If any of the values are negative it should return false bool noNegatives (const int array[], int size); Write a function named absoluteValue.... It should accept an array of integers and a size argument. It should replace any negative values with the corresponding positive value. void absolutevalues(int array[], int size); Write a function named showValues...). It should accept an array of integers and a size argument. It should display all array elements, one per line. void showvalues (int array[], int size);
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