C++ Code Reading: Bug in a Linked-List insertAfter and Predicting Polymorphic Output
Company: AMD
Role: Software Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Onsite
Overview: Two C++ code-reading exercises: find the bug in a singly linked list insertAfter function that is missing a pointer update and predict what the program prints, then predict and explain the output of code mixing virtual overriding, name hiding, constructors, default arguments and pass-by-value. It tests precise tracing of pointers and dispatch rules.
Read the full AMD Software Engineer interview experience this question came from