About this question

C++ Dangling Reference Analysis

Hard · Code Analysis · Quant Trader interview question · cpp, dangling-reference, undefined-behavior, memory-management

Consider the following C++ code snippet: What is the most likely outcome when the line int y = ref + 5; is executed?