How many members data and functions) does the following class have?
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) 2
B) 6
C) 5
D) 7
E) 8
Correct Answer:
Verified
Q27: Operators can be overloaded as
A) friends of
Q28: Given the following class, which is the
Q29: The assignment operator must be a _
Q30: When overloading an operator, which of the
Q31: How many parameters are there in a
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
Q37: Given the following class, what is syntactically
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