Consider this line of code: int calculate(double n) { return n * n: } a. What is
ID: 3853901 • Letter: C
Question
Consider this line of code: int calculate(double n) { return n * n: } a. What is the return type?___ b. What is the parameter type (going into the function)?___ c. What is name (identifier) of the function?___ d. Write a call to this function with the proper syntax.___ Circle true or false for #2. True or False: The setw manipulator cannot use a string as an argument. The pow(2, 3) function requires you to include which header/library file?___ The setw function requires you to include which header/library file?___Explanation / Answer
Given funtion is:
int calculate(double n)
{
return n*n;
}
a) What is return type?
Retrurn type is int as per declaration.
b)What is parametre type?
Here parameter is n. And it's data type is double.
c) What is name of the function?
Name of the function is: calculate.
d)Write a call to this funtion with the proper suntax.
int c = calculate(n);
2) Ans: True.
3)#include <math.h>
4)#include <iomanip>
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.