Inheritance Quiz-Asked in Interviews

What will be the output of the following code snippet?

A) Compiler Error in line “ bp->show()”

B) Compiler Error in line “ cout << bp->x”

C) In Base 10

D)In Derived 10

Solution: B are Correct

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.




Upskilling students for tech placements!

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Like seriously , How Are Apps Able To Do More Than One Thing ?

Code Refactoring: Meaning, Purpose, Benefits

SaaS Localization: Your Ultimate Checklist for Success

Use Timeboxing Mindset to Speed Up Your Development

Best Hyper-V Management Tools for Your Virtual Environment

An Extremely Basic Introduction into Websockets


It’s time to tidy up your code: How to use Visual Studio Code Autoformat

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Upskilling students for tech placements!

More from Medium

Parity Alternated Deletions Coding Question

Path With Minimum Effort

0/1 Knapsack

LeetCode 843. Guess the Word