the output of the above program should be:
Base class Constructor
15
Derived class Constructor
15
but
the output of the above program is:
Base class Constructor
5
Derived class Constructor
15
can you please explain me why is it so??
because when show() of base class will be called then automatically show() of derived class will be called due to overriding mechanism but why x=0+5=5 is printing why not x=10+5=15 is printing instead of 5 please explain me i will be highly thankful to you
thank you in advance