If you want to learn what is distractor click this

Deleting a derived class object using a pointer of base class type that has non-virtual destructor results in undefined behavior.

To correct this situation, the base class should be defined with a virtual destructor.

So without a virtual distractor See what happen when we create a pointer object in the main() function Here the code:

A simple program for distractor:-

Without Virtual Distractor

The output of this code is:


We, all know Data Structures And Algorithms are necessary for any software jobs out there other than that we need to know Data Structure because it is necessary to make a good application that is useful for the end-user.

So here some of the points that convinces you why this is very Important

You Cannot be a good software developer without learning DSA. It is a must-have thing. Algorithms make code faster, efficient, reduce time complexity and space complexity. Suppose that you make an app that uses space complexity O(N²) then just think, suppose your app is 1GB then (1024)² Mb will be your app size, that is very problematic so it is one…


So, JavaScript introduce this keyword in es5 but some new things came into this keyword in es6 or es2015. It is a keyword to access members of objects. Ok! lets talk about one examples to understand this properly…

JavaScript object Exemple -1
JavaScript object Exemple -1

Here, you can see I make a object named person and I set firstName, secondName , age and to access that I use this keyword and after that I use a JavaScript method to print birth year of this person. Ok! just check what is this code gives output.

Diganta Chaudhuri

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