Question: 9. In the following code, indicate if the selected lines are legal or illegal: #include class small public: small( ) {size = 0;}; void k()

 9. In the following code, indicate if the selected lines are

9. In the following code, indicate if the selected lines are legal or illegal: #include class small public: small( ) {size = 0;}; void k() const; void h(int i) friend void f (small z); private: int size; void small::k ) const small x, y; x=y; // LEGAL/ ILLEGAL? x.size =y.size; // LEGAL/ILLEGAL ? x.size -3; /7 LEGAL/ILLEGAL? void small::h(int i) void f (small z) small x, y; x =y; // LEGAL / ILLEGAL ? x.size -y.size; // LEGAL/ILLEGAL? x.size 3; /7 LEGAL/ILLEGAL? x.h(42); // LEGAL/ILLEGAL? int main) ( small x, y; x=y; // LEGAL/ ILLEGAL? x.size =y.size; // LEGAL/ILLEGAL ? x.size -3; /7 LEGAL/ILLEGAL? x.h(42); // LEGAL/ILLEGAL? std: :cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!