Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MFDBS 89 2nd Symposium On Mathematical Fundamentals Of Database Systems Visegrad Hungary June 26 30 1989 Proceedings

Authors: Janos Demetrovics ,Bernhard Thalheim

1989th Edition

3540512519, 978-3540512516

More Books

Students also viewed these Databases questions