Pregunta de entrevista de Bloomberg

difference between malloc and new

Respuesta de la entrevista

Anónimo

20 feb 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.