Answer Posted / skybeaver
The "new" operator allocates a new instance of an object
from the heap, utilising the most appropriate constructor
for the arguments passed.
Like many operators in C++, the "new" operator for a
particular class can be overriden, although there is rarely
a need to do so. "operator new" is the mechanism for
overriding the default heap allocation logic. Ask your
interviewer to provide you with a concrete example of when
he or she has been required to do this.
Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
Can enum be null?
What is methods in oop?
Why polymorphism is used in oops?
What is destructor oops?
Is this job good for future? can do this job post grduate student?
Why can't we have instance(stack) of a class as a member of the same class like eg.Class A{A obj;} as we can have self refential pointer
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
Can you explain polymorphism?
What is polymorphism used for?
What is encapsulation with example?
What is advantage of inheritance?
What is the advantage of oop over procedural language?
What is this pointer in oop?
write string class as your own class in java without using any built-in function
What type of loop is a for loop?