Q70
What will be the output of the following C++ code? #include using namespace std; class A public: A() cout<<"Constructor called "; ~A() cout<<"Destructor called "; ; int main(int argc, char const *argv[]) A *a = new A[5]; delete a; return 0;
A.
"Constructor called" five times and then "Destructor called" five times
B.
"Constructor called" five times and then "Destructor called" once
C.
Error
D.
Segmentation fault
AnswerAnswer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board