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

Write a C Program. Compile with gcc -Wall. Name file maxmin.c 10

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!