Question
Write a function int max_of_four(int* a, int* b, int* c, int* d) which reads four pointer arguments and returns the greatest of the values pointed
Write a function int max_of_four(int* a, int* b, int* c, int* d) which reads four pointer arguments and returns the greatest of the values pointed by them.
Input Format
Input will contain four pointers to integers - , one in each line.
Output Format
Print the greatest of the four integers. PS: I/O will be automatically handled.
Sample Input
3
4
6
5
Sample Output
6
#include
#include
using namespace std;
/*
Add `int max_of_four(int* a, int* b, int* c, int* d)` here.
*/
int main() {
int *a, *b, *c, *d;
scanf("%d %d %d %d", what should we put here);
int ans = max_of_four(what should we put here);
printf("%d", ans);
return 0;
}
Use Visual Studio to type-up the code
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started