For all the boreland compilers(including turbo c) you will have to use getch() before the return statement for the program to display you the output properly.
You will have to use the header "conio".
Basically what happens is that whenever you are running your program with boreland tools, it will return to the editor as soon as the program terminates. It will not wait for you to see the output.
Getch() is used to get single character output from the user. So when you insert getch it will wait for you to press a key and then the program will terminate.