In C++, if new operator is used, when is the constructor called?
A. Before the allocation of memory
B. After the allocation of memory
C. Constructor is called to allocate memory
D. Depends on code
Answer:B
In C++, if new operator is used, when is the constructor called?
A. Before the allocation of memory B. After the allocation of memory C. Constructor is called to allocate memory D. Depends on code