As many would recognise, this is a common interview question.
two differences I can think of are:
1) new calls the constructor and malloc does not.
2) new returns a pointer of the exact type of the object and malloc returns a void *.
anyhing else to add?
I




Reply With Quote