Can we declare destructor as static? Explain?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can a struct in c++ differs from a struct in c?

805


Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.

862


Ask to write virtual base class code?

2465


Why ctype h is used in c++?

707


What is type of 'this' pointer? Explain when it is get created?

778


What does it mean to declare a member variable as static?

811


If I is an integer variable, which is faster ++i or i++?

794


Explain "const" reference arguments in function?

812


What return value must conversion operators have in their declaration?

818


What is object in c++ example?

840


What are destructors?

746


When we use Abstract Class and when we use Interface?where we will implement in real time?

1903


What is a class template in c++?

778


Write a Program to find the largest of 4 no using macros.

830


what is the difference between overloading & overriding? give example.

800