Solved

Given the Following Class, What Is Syntactically Wrong with the Implementation

Question 37

Multiple Choice

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents