logo

Crowdly

Browser

Додати до Chrome

#include <iostream>   using namespace std;   class A{   public:      ...

✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.

#include <iostream>  

using namespace std;  

class A{  

public:  

    A(){  

        cout<<"Constructor called\n";  

       }  

    ~A(){  

        cout<<"Destructor called\n";  

        }   

};  

int main(int argc, char const *argv[])  

{  

    A *a = new A[5];  

    delete[] a;  

    return 0;  

}  

  1. Segmentation failure.
  2. Error.
  3. The Constructor will be invoked five times, and after that destructor will be invoked only once.
  4. The Constructor will be invoked five times, and after that destructor will also be invoked five times.

0%
0%
0%
0%
Більше питань подібних до цього

Хочете миттєвий доступ до всіх перевірених відповідей на moovit.vit.ac.in?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome