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:

Verified
Correct Answer:
Verified
Q46: Both the copy constructor and the assignment
Q47: Functions that are constant member functions may
Q48: Which of the following are not correct?<br>A)
Q49: What is wrong with the following overloaded
Q50: Operators can be overloaded as<br>A) friends of
Q51: To overload functions with symbolic names like
Q53: Given the following class and array declaration,
Q54: Putting the keyword const in front of
Q55: When a dynamic array with a class
Q56: Why should you generally pass an object