Question: You are given the following class definition: class Ratio{ private: int num, den; public: Ratio(int n, int d); explicit Ratio(int n); Ratio(const Ratio& r); void
You are given the following class definition: class Ratio\{ private: int num, den; public: Ratio(int n, int d); explicit Ratio(int n); Ratio(const Ratio\& r); void operator=(Ratio\& a); Examine the following code. State after each line of the code whether a member function of the class has been called or not. If yes, state which function was called. Note that the output of the code is not required, as the function definitions are not given: Ratio a (3,7); Ratio c(2); { Ratio d=c; \} int n=4
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
