in this program. a, int b, int *c, int *d, int *resu a, int *b, int *c, int *d, int *resu int *res

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Paragraph
Your job will be to create a program that uses pointers. Your output must be done in the
main function and the calculations MUST be done in the three functions. Therefore you
MUST use pointers correctly.
You must declare and implement the following 3 functions. Below are the three prototypes
that you must use in this program.
void max (int *a, int *b, int *c, int *d, int *result);
void min (int *a, int *b, int *c, int *d, int *result);
void mul (int *a, int *b, int *c, int *d, int *result);
The functions have the following meaning:
max
finds the max value of a,b,c,d and stores the largest value in result.
min
finds the min value of a,b,c,d and stores the largest value in result.
mul
multiplies a * b *c and divides by d. Stores that value in result.
Below is an example input/output. This input will be read in via the keyboard (use
scanf).
input
output (note that user input is shown in bold)
Enter the 4 numbers: 1 2 3 4
The max is 4. The min is 1. (a * b * c) /d = 1
1234
Enter the 4 numbers: 100 3 201 103
100 3 201 103
The max is 201, The min is 3. (a * b* c) /d = 585
Your output MUST match exactly the output and the.input from above.
You only need to submit your file (pointers.c)
12
Transcribed Image Text:Paragraph Your job will be to create a program that uses pointers. Your output must be done in the main function and the calculations MUST be done in the three functions. Therefore you MUST use pointers correctly. You must declare and implement the following 3 functions. Below are the three prototypes that you must use in this program. void max (int *a, int *b, int *c, int *d, int *result); void min (int *a, int *b, int *c, int *d, int *result); void mul (int *a, int *b, int *c, int *d, int *result); The functions have the following meaning: max finds the max value of a,b,c,d and stores the largest value in result. min finds the min value of a,b,c,d and stores the largest value in result. mul multiplies a * b *c and divides by d. Stores that value in result. Below is an example input/output. This input will be read in via the keyboard (use scanf). input output (note that user input is shown in bold) Enter the 4 numbers: 1 2 3 4 The max is 4. The min is 1. (a * b * c) /d = 1 1234 Enter the 4 numbers: 100 3 201 103 100 3 201 103 The max is 201, The min is 3. (a * b* c) /d = 585 Your output MUST match exactly the output and the.input from above. You only need to submit your file (pointers.c) 12
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY