Pergunta de entrevista da empresa Cadence Design Systems

A large 3-page C++ code puzzle to debug. Given, no syntax errors but the code crashes at runtime. There were multiple things wrong with code (5-7) and I was asked to find as many as I could.

Resposta da entrevista

Sigiloso

22 de mai. de 2017

There was 1 critical error (causing the crash) that was spread across various statements related to the C++ Rule of 3. Moreover, there were many more errors worth correcting both as bugs as well as better coding practice.