+1 vote
9 views

Please explain and give the output of the following program:

#include <iostream>
using namespace std;
class BaseClass {
public:
void disp(){
cout<<"Parent Class Function";
}
};
class DerivedClass: public BaseClass{
public:
void disp() {
cout<<"Child Class Function";
}
};
int main() {
DerivedClass obj = DerivedClass();
obj.disp();
return 0;
}
by (1.2k points)   | 9 views

Please log in or register to answer this question.

Related questions

+2 votes
1 answer
+1 vote
2 answers
+2 votes
0 answers
asked Jun 12 by toheed (1.2k points) | 9 views
+2 votes
1 answer
asked Jun 5 by toheed (1.2k points) | 13 views
+1 vote
1 answer
asked Jun 27 by fatyma Nauman (485 points) | 24 views
+2 votes
1 answer
+2 votes
3 answers
+3 votes
1 answer




Welcome to Meansflow - Where Developers and Students Learn, Share, & Build Careers, where you can ask questions and receive answers from other members of the community.
113 questions
85 answers
38 comments
103 users