Pregunta de entrevista de Samsung Electronics

Some problem regarding dynamic memory allocation.