I can not run your exe file. I've got the error about program incompatibillity with my x64 os.

That is probably due the program being compiled on 32-bit OS?

So I've opened your c file, tried to compile it and received the same error as before, so most definitely it's compiler related problem.
I will try Turbo C++ and some other compilers, and report the resulits once I'm done.

This problem became pretty irritating for me, since I can not solve it for days, and it's such a simple program. And I have previous experince in programming much complicated stuff in C/C++/C#. However it's been some time since my last program

Once more, thank you very much for you effort.
I'll update this topic once I test all the other compilers.