info@avatto.com
+91-9920808017
0. The following programclass abc;class def{int i1 ; // statement 1protected: int i2; // statement 2public: int i3; //statement 3friend abc;} ;class abc{public:void main(def A){cout << (A.i1=3);cout << (A.i2=4);cout << (A.i3=5);}} ;void main( ){def x1 ;abc x2 ;x2.mn(x1);}
will compile successfully if statement 1 is removed
will compile successfully if statement 2 is removed
will compile successfully if statement 3 is removed
will run successfully and print 34 5
Your email address will not be published. Required fields are marked *
Report
Name
Email
Website
Save my name, email, and website in this browser for the next time I comment.
Comment
Login with Facebook
Login with Google
Forgot your password?
Lost your password? Please enter your email address. You will receive mail with link to set new password.
Back to login