Question: Write a C Program. Compile with gcc -Wall. Name file maxmin.c 10 (You can define a constant N at the beginning as array size 10).
Write a C Program. Compile with gcc -Wall. Name file maxmin.c

10 (You can define a constant N at the beginning as array size 10). Example: Enter 10 numbers: 113 12 11 9 99 80 12 812 Largest: 99 Smallest: 1 You need to use pointers for writing the program. We name the function max_min whose prototype is given below: void max min(int a, int n, int "max, int "min) Note: You could use "a instead of al] in function prototype Note that this is a void function so no return value is expected. We call the function using this in main, assuming we have an array "b" of size N-10 max_min(b, N, &big, &small) Hint: This is the beginning of a "for" loop which you can use in your function (note that "a means &a[0" and a+n means &a[n]", do not forget the asterisks in your function for min and Kwx for (p = a; p *max) *max = *p
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
