Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged inheritance
0
votes
0
answers
1
self doubt:- c++
Please explain the working of this code:- #include<iostream> using namespace std; class Base { public: int x; Base():x(10){} ~Base(){} }; class Derived:public Base { public: int y; Derived():y(20){} ~Derived(){} }; int main() { Base bobj,*bptr; ... (Derived*)&bobj; cout<<dptr->x<<endl; cout<<dptr->y<<endl; } Output:-10 10 0 [Finished in 2.7s]
Please explain the working of this code:- #include<iostream using namespace std; class Base { public: int x; Base():x(10){} ~Base(){} }; class Derived:public Base { publi...
kd.....
281
views
kd.....
asked
May 12, 2018
Object Oriented Programming
programming
inheritance
pointers
+
–
1
votes
0
answers
2
Programming in c plus plus
Give a simple example on inheriting the operator function and using it in programme
Give a simple example on inheriting the operator function and using it in programme
anonymous
260
views
anonymous
asked
Apr 22, 2018
Object Oriented Programming
programming-in-c
inheritance
object-oriented-programming
+
–
2
votes
1
answer
3
UGC NET CSE | Junet 2015 | Part 2 | Question: 15
When the inheritance is private, the private methods in base class are _____ in the derived class (in C++) inaccessible accessible protected public
When the inheritance is private, the private methods in base class are _____ in the derived class (in C++)inaccessible accessibleprotectedpublic
go_editor
7.4k
views
go_editor
asked
Jul 30, 2016
Object Oriented Programming
ugcnetcse-june2015-paper2
oops
inheritance
+
–
2
votes
3
answers
4
UGC NET CSE | Junet 2015 | Part 2 | Question: 12
Which of the following, in C++, is inherited in a derived class from base class? constructor destructor data members virtual methods
Which of the following, in C++, is inherited in a derived class from base class?constructordestructordata membersvirtual methods
go_editor
6.7k
views
go_editor
asked
Jul 30, 2016
Object Oriented Programming
ugcnetcse-june2015-paper2
oops
inheritance
+
–
1
votes
1
answer
5
UGC NET CSE | December 2013 | Part 2 | Question: 19
_____ allows to create classes which are derived from other classes, so that they automatically include some of its "parent's" members, plus its own members. Overloading Inheritance Polymorphism Encapsulation
_____ allows to create classes which are derived from other classes, so that they automatically include some of its "parent's" members, plus its own members.OverloadingIn...
go_editor
738
views
go_editor
asked
Jul 25, 2016
Object Oriented Programming
ugcnetcse-dec2013-paper2
inheritance
+
–
To see more, click for the
full list of questions
or
popular tags
.
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register