Given the following class, what is syntactically wrong with the implementation of 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;
};
Void displayostream& out, const Rational& value)
{
Out << value.getNumerator) << '/"<<value.getDenominator) ;
}
A) nothing
B) value must be not be pass by reference
C) The get functions are not const functions
D) out should be pass by value
Correct Answer:
Verified
Q32: How many members data and functions) does
Q33: What is wrong with the following overloaded
Q34: Since accessor functions in a class do
Q35: Write the function declaration for a destructor
Q36: Both the copy constructor and the assignment
Q38: Why should you generally pass an object
Q39: How many parameters are there in a
Q40: If we have a full selection of
Q41: What member functions do you need to
Q42: Given the following function declaration,
Friend void displayconst
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