Puzzle #6 (based on C++17)
#include <memory>

auto foo(int* ptr)
{
    *ptr = 2;
    return *ptr;
}

int main()
{
    return foo(std::make_unique<int>().get());
}
With given code, pick one answer:
Guaranteed to return 2 from main
Guaranteed to return something other than 2 from main
Undefined bahaviour
Implementation defined
Will not compile