@shadowCODE is right, gcc Compiler complains during the compilation the error he mentioned in his comment.
I have some more comments on the code, why main function is void? main in c++ must have return type of int as a return type, this is most important. Please correct me is if I am wrong.
He is using Turbo C, which is super old, and I think doesn't have proper error checking. It doesn't use int main, but void main. I HIGHLY recommend you use something newer. Turbo C++ seems to not have been supported since 2006. Why not use Visual C++ or Dev C++ if you are on windows, or some equivalent if you are using Linux (I hear people like Code::Blocks on Linux). Thank, Spike.
I am seeking the answer to my basic question - why is the above code working? I know that newer compiler are available and TuboC 4.5 is an old compiler but does that mean that the above code is running due to a compiler problem?
> does that mean that the above code is running due to a compiler problem?
Yes, it is non-conforming with respect to this. Which is not surprising; the first International Standard for C++ came a few years after this compiler was released.