What is the output of the program:
#include <bits/stdc++.h>
using namespace std;
int main()
{
unordered_map<int, int> m = {{1, 10}, {2, 20}};
auto it = m.find(1);
m.erase(it);
cout << it->second;
return 0;
}
10
20
Undefined behavior
Compilation error
This question is part of this quiz :
C++ Unordered Map