Question: C Program NOT C++ Pointers Please DO NOT write the program if YOU ARE NOT SURE about the answer For each of the programs assigned
C Program NOT C++
Pointers
Please DO NOT write the program if YOU ARE NOT SURE about the answer
For each of the programs assigned below, submit a copy of the source code (.c file---not a Word document)
Observe the usual guidelines regarding the initial comment section, indenting, and so on. In addition, when functions are required, place function definitions following main. Before each function use comments to explain what the function does. Do not use global variables.
1. In function main, declare a one-dimensional integer array with 25 values between -100 and 100. Call the following functions from function main.
Call a function createArray to seed the random number generator and to fill the one-dimensional array with random integers between -40 and +40. Parameters for this function should be the array and the number of elements).
Call a second function maximum to find the largest value in the array and the second largest. Return the largest value and second largest value as pointer parameters. (The function will have four parameters: the array, number of values and pointers to the largest value and second largest value.
Call a function signs to count the number of positive values, number of negative values and number of zeros. Parameters are the array, number of values, and pointers to the number of positives, number of negatives, and number of zeros.
Call a function printResults to print the array five values per line, largest and second largest values, and the number of positives, negatives, and zeros. There are seven parameters, including the number of values, none of which needs to be a pointer.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
