Given the following class, which is the correct function header for the display function?
Class Rational
{
Public:
Rational) ;
Rationalint numer, int denom) ;
Rationalint whole) ;
Int getNumerator) ;
Int getDenominator) ;
Friend void displayostream& out, const Rational& value) ;
Private:
Int numerator;
Int denominator;
};
A) friend void displayostream& out, const Rational& value)
B) void displayostream& out, const Rational& value)
C) void Rational::displayostream& out, const Rational& value)
D) friend void Rational::displayostream& out, const Rational& value)
Correct Answer:
Verified
Q23: Write the function declaration for an assignment
Q24: Who can access private data in a
Q25: Which of the following would be an
Q26: To overload functions with symbolic names like
Q27: Operators can be overloaded as
A) friends of
Q29: The assignment operator must be a _
Q30: When overloading an operator, which of the
Q31: How many parameters are there in a
Q32: How many members data and functions) does
Q33: What is wrong with the following overloaded
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents