Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


if there is binary tree which one is the easiest way to
delete all child node?



if there is binary tree which one is the easiest way to delete all child node? ..

Answer / q

class BinaryTreeNode
{
BinaryTreeNode *left,*right;
public:

//....

//....
~BinaryTreeNode()
{
if(left) delete left;
if(right) delete right;
}

};

delete root, all child nodes will be deleted recusively...

Is This Answer Correct ?    11 Yes 5 No

Post New Answer

More C++ General Interview Questions

Specify different types of decision control statements?

0 Answers  


Define a conversion constructor?

0 Answers  


When volatile can be used?

3 Answers   Symphony,


What are structs in c++?

0 Answers  


What are the weaknesses of C++?

1 Answers  


What is oops in c++?

0 Answers  


What is the best c++ compiler for windows 10?

0 Answers  


Explain the volatile and mutable keywords.

0 Answers  


How are the features of c++ different from c?

0 Answers  


Is c++ an oop?

0 Answers  


What are the main characteristics of C++ as a programming language?

1 Answers  


What is std :: flush?

0 Answers  


Categories