title: C++ weird execution order
body: <p>When running this code on Code Blocks breakpoint 2 occurs before breakpoint 1.</p>
  <p>Breakpoint 1 eventually occurs followed by breakpoint 1 but just wondering why it occurs in the order 212</p>
  <pre><code>#include &lt;bits/stdc++.h&gt;
  using namespace std;
  
  void solve() {
      int n; cin &gt;&gt; n; // Breakpoint 1
      int monks[n];
  
      for(int i=0; i&lt;n; i++){
          int a; cin &gt;&gt; a;
          monks[i] = a;
      }
  
  
  
      sort(monks, monks+n);
  
  
      int total = 0; // Breakpoint 2
  
  }
  
  int main() {
      ios_base::sync_with_stdio(0);
      cin.tie(0); cout.tie(0);
  
      freopen(&quot;hirein.txt&quot;, &quot;r&quot;, stdin);
      freopen(&quot;hireout.txt&quot;, &quot;w&quot;, stdout);
  
      solve();
  
      return 0;
  }
  </code></pre>