๐ Bug HuntC+ C++ Medium+20 XP
Dangling Reference
This function returns a dangerous reference.
๐ Find the bug
1
int& getRef() {2
int x = 42;3
return x;4
}๐ The bug is on line 3
This function returns a dangerous reference.
int& getRef() { int x = 42; return x;}