The main program must display all of the inputs to the function, then call the function, and then display the results produced by the function. The function itself must not print anything.
Examples: reorder2.c, minmax.c, replace.c
Write a function that reorders the values in three integer variables such that the values are in ascending order. The function declaration is:
void reorder( int *a, int *b, int *c)where a, b, and c are pointers to the three variables.
Write a function that returns the double average value of a one-dimensional integer array, in addition to determining the number of values in the array that are greater than the average. The function declaration is:
double average( const int x[], int npts, int *gtr)where npts contains the number of values in array x and gtr is a pointer to the variable that stores the number of values in x that are greater than the average.
In the function, assume that *gtr has not been initialized; i.e. you must initialize it or set it in the function as needed.
Write a function that returns the number of positive values, zero values, and negative values in an integer array. Assume that the corresponding function prototype statement is:
void signs( const int x[], int npts, int *npos, int *nzero, int *nneg)where npts contains the number of values in the array x and npos, nzero, and nneg are pointers to variables to store the numbers of positive values, zero values, and negative values in the array.
In the function, assume that *npos, *nzero, *nneg have not been initialized; i.e. you must initialize them or set them in the function as needed.
Write a function that receives a pointer to a character string and a character. The function should return the number of times that the character occurred in the string. The function declaration is:
int charcnt( const char *ptr, char c)Extra/optional