Question
1.
#include
2.
#include
3.
using namespace std;
4.
struct A
5.
{
6.
virtual ~A() { };
7.
void operator delete(void* p)
8.
{
9.
cout
What is the output of this program?
1.
#include
2.
#include
3.
using namespace std;
4.
struct A
5.
{
6.
virtual ~A() { };
7.
void operator delete(void* p)
8.
{
9.
cout
Answer: Option B
Was this answer helpful ?
In this program, We are passing the value to the B, So we are printing B::operator delete.
Output:
$ g++ free.cpp
$ a.out
B::operator delete
Was this answer helpful ?
Submit Solution