Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



Find the output from the following C++ code snippet: 
class A 
{ 
public: void show()
{ 
cout<<"Class A "; 
} 
}; 
class B: public A 
{ 
public: void show()
{ 
A::show(); 
cout<<"Class B"; 
} 
}; 
int main()
{ 
B obj; 
obj.show(); 
}





Solution

Calls A::show then prints Class B.


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...