+1 vote
15 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.4k points)   | 15 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.4k points) | 21 views
+2 votes
1 answer
asked Jun 5 by toheed (1.4k points) | 17 views
+1 vote
1 answer
asked Jun 27 by fatyma Nauman (555 points) | 44 views
+2 votes
1 answer
+2 votes
3 answers




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.
118 questions
90 answers
43 comments
111 users