1.Write the prototype of a function called \"sub\" that take two variables x, y
ID: 3677702 • Letter: 1
Question
1.Write the prototype of a function called "sub" that take two variables x, y of type double and return another double.
2.
void display(string v)
{
cout << " Inside display " << v << endl;
return 0;
}
What is wrong with the code above?
The name of the function is a reserved word.
void need to be removed.
cout needs to be replaced by cin
It is a void function, trying to return 0, an integer.
A.The name of the function is a reserved word.
B.void need to be removed.
C.cout needs to be replaced by cin
D.It is a void function, trying to return 0, an integer.
Explanation / Answer
1)double sub(double x,double y);
It is a void function, trying to return 0, an integer.
2)D.It is a void function, trying to return 0, an integer.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.