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...


Can we declare destructor as static? Explain?

Answers were Sorted based on User's Feedback



Can we declare destructor as static? Explain?..

Answer / murali

Yes we can. But you can't use it.

Use new to create the object.
At the same time you can't use delete.

Why can't : As destuctor uses 'this' context and in this
case it can't being static.

Is This Answer Correct ?    8 Yes 2 No

Can we declare destructor as static? Explain?..

Answer / jaroosh

To sum up : you CANT declare destructor as static, as you
CANT declare constructor as static, both are responsible for
destroying and creating OBJECTS while static storage means
that methods/members do not belong to any objects but to the
whole class.

Is This Answer Correct ?    7 Yes 1 No

Can we declare destructor as static? Explain?..

Answer / sunil

declaring destructor and constructor as static is a syntax error

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C++ General Interview Questions

Do inline functions improve performance?

0 Answers  


Where can I run c++ program?

0 Answers  


why and when we can declar member fuction as a private in the class?

0 Answers  


What jobs can you get with a c++ certification?

0 Answers  


Can we generate a C++ source code from the binary file?

2 Answers  


How many characters are recognized by ANSI C++?

0 Answers   Hexaware, NIIT,


Can non-public members of another instance of the class be retrieved by the method of the same class?

0 Answers  


What is the purpose of extern storage specifier?

0 Answers  


What are the c++ access specifiers?

1 Answers  


What are different types of polymorphism supported by C++

2 Answers   CA, GameLoft,


What do you mean by function pointer?

0 Answers  


Which bit wise operator is suitable for putting on a particular bit in a number?

0 Answers  


Categories