Interview Question

Member of Technical Staff Interview

Allocate memory for 2d matrix. 3 methods : using row

  +1, 2 and 1 malloc calls. What can be wrong with using only one malloc call? Which one is faster for accessing memory, out of method 1 and 2? Write code for freeing this 2d array.
Tags:
c++, array
Answer

Add Answers or Comments

To comment on this review, Sign In with Facebook or Sign Up