Explain difference between malloc() and free()
qwerty4562:
Anyone Here??
Answers
Answered by
0
malloc and free are function in c; malloc returns null ptr when fails while new throws exception. address returned by malloc need to by type casted again as it returns the (void*)malloc(size) New return the typed pointer. new is an operator, whereas malloc() is a function.
HOPE IT HELPS YOU.
Similar questions