This is a well-known bug in the Turbo C 3.0 compiler.
But note one thing: currently the behaviour of your function is undefined as main
should always have an int
return type. Formally, a standards compliant compiler is permitted to do anything with your program!
If you adjust your program so it has no undefined constructs then, on a standard compliant compiler, it will be guaranteed to output “hello” exactly once.
8
solved Why It showing Hello two times try in on Turbo C v 3.0 [closed]