Bloomberg interview question

difference between malloc and new

Interview Answer

Anonymous

Feb 20, 2013

malloc will need and head doc, while new won't. malloc is a function, while new is a operation symbol. malloc is to assign space, while new is to create new object. new will be able to construct and analyze corresponding function in data structure, while malloc cannot.