What is the output of this code ?
#include <iostream> using std::cout, std::endl; int main() { int i = 1; { int i = i; i += 1; } cout << i << endl; }
1
2
nothing, it produces a compilation error
that’s an undefined behavior