Pergunta de entrevista da empresa Samsung Electronics

Some problem regarding dynamic memory allocation.