Consider the following function prototypes: int test(int, char, double, int); do
ID: 3822335 • Letter: C
Question
Consider the following function prototypes:
int test(int, char, double, int);
double two(double, double);
char three(int, int, char, double);
Answer the following questions.
How many parameters does the function test have?
What is the type of the function test?
How many parameters does function two have?
What is the type of function two?
How many parameters does function three have?
What is the type of function three ?
How many actual parameters are needed to call the function test?
What is the type of each parameter, and in what order should you use these parameters in a
call to the function test?
Write a C++ statement that prints the value returned by the function test with the actual parameters 5, 5, 7.3, and 'z'.
Write a C++ statement that prints the value returned by function two with the actual parameters 17.5 and 18.3, respectively.
Write a C++ statement that prints the next character returned by function three. (Use your own actual parameters.)
Explanation / Answer
given information is:
int test(int, char, double, int);
double two(double, double);
char three(int, int, char, double);
How many parameters does the function test have?
The test function have four parameters they are: int, char, double, int
What is the type of the function test?
The test function is a data type of integer.
How many parameters does function two have?
The two function have two parameters they are: doouble, double
What is the type of function two?
The test function is a data type of double.
How many parameters does function three have?
The three function have four parameters they are: int, int, char, double
What is the type of function three ?
The three function is a data type of char.
How many actual parameters are needed to call the function test?
Four. Since test function contains four parameters and we should have four parameters to call that function.
What is the type of each parameter, and in what order should you use these parameters in a
call to the function test?
int, char, double, int.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.