Correct Answer : It will not have the destructor
Explanation : In the C++ program, if we use a class without assigning a name. As a result, it will not be going to have a destructor, but it will have the object. To understand it in more detail, consider the following program:
#include
using namespace std;
class
{
public:
void func()
{
cout<<"Hello world";
}
}a;
int main(int argc, char const *argv[])
{
a.func();
return 0;
}​