5 ed out of question #include using namespace std; class base { protected: | int p=2; int a=10; public: void

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

5 ed out of question #include using namespace std; class base { protected: | int p=2; int a=10; public: void

Post by answerhappygod »

5 Ed Out Of Question Include Iostream Using Namespace Std Class Base Protected Int P 2 Int A 10 Public Void 1
5 Ed Out Of Question Include Iostream Using Namespace Std Class Base Protected Int P 2 Int A 10 Public Void 1 (91.41 KiB) Viewed 38 times
5 Ed Out Of Question Include Iostream Using Namespace Std Class Base Protected Int P 2 Int A 10 Public Void 2
5 Ed Out Of Question Include Iostream Using Namespace Std Class Base Protected Int P 2 Int A 10 Public Void 2 (222.99 KiB) Viewed 38 times
5 ed out of question #include <iostream> using namespace std; class base { protected: | int p=2; int a=10; public: void printp() {cout << p;} }; class deriv : public base { int c=5; public: void printAll(){ printp(); cout << "," «a << "," « c; } }; int main() { deriv obj; obj.printAll(); } a. 10,5 O b. 2., 10.5 O co Compilation Error d. 2 10,5

6 #include <iostream> using namespace std; class base { ed out of question public: int p=1; int a=1; void printp() {cout k p;} }; class deriv : public base { public: int c=5; }; int main() { deriv obj; cout <<obj.p<< "," << obj.a << "," << obj.c; } O a Compilation Erron eb. 1 1 5 OG 1. 15 Od 5.11
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply