Krktv's blog

By Krktv, history, 8 years ago, In English

Hey codeforces! One day I launched MinGW Studio and checked this simple code:

#include <iostream>
using namespace std;
int main() {
    int n = 50;
    cin >> n;
    cout << n;
    return 0;
}

I wrote 'z' on the console and saw '50'. Nothing strange. But when I did the same on the last version of CodeBlocks, I saw '0'. Can someone explain me what exactly happens in there and why it happens in CodeBlocks and doesn't happen in MinGW Studio?

Full text and comments »

  • Vote: I like it
  • -5
  • Vote: I do not like it