1.2 – How to Install Turbo c in Windows XP

by subbu on July 24, 2013

Installation of TURBO C compiler on Windows XP/vista:

Turbo C is an integrated development environment and compiler for C programming language from Borland. It was first introduces in 1987 as Turbo C 1.0. The second version of Turbo C 2.0 was released during late 1989. In 1990 Borland replaced Turbo C with Turbo C++ 3.0. The latest version is Turbo moniker released in 2006.

Though Turbo C compiler may not be used in commercial development, it is best to startup with, Due to its simple, speed and user friendly environment.

Here we will see the step by step procedure of installation and configuration of Turbo C++ 3.0 under windows XP. It can be used to write and compile both C and C++ programs.

Installation procedure of Turbo C on Windows XP/Vista:

Step1: click the following download link to download “tc3_setup.zip”

free turboc for windows 7/8

Step2: Unzip the “tc3_setup.zip” and double click on “tc3_setup” file

turbo c setup

Step3: Select the “install” button

install

Step4: Select close to complete installation

completing turbo c installation

Configuring Turbo C:

Once the installation process is completed then we need to specify the locations of include, lib, output and source directories to turbo C

Step1: Create an output directory any where on the hard disk. All the object files and executable files generated by the compiler would be stored in the output directory.
Here, i am creating my output directory as c:\tc\works

Creating working folder for Turbo C

Step2: Open the C-IDE (Integrated Development Environment) by double click on “Turbo C++ 3.0” which is on desktop.

TC short cut

Step3: Specify the locations of include, lib, source and output folders in the directories option

On Authors machine Directories are
Include Directory : c:\tc\include
Lib Directory : c:\tc\lib
Output Directory: c:\tc\works
Source Directory: c:\tc

Select Options (Alt+O), Directories (D)

setting directories in TC

These details may change version to version, hoping you will set according to your machine

Step4: Save the options
We have to save the options whenever we modify the options otherwise changed settings may not come into action. To save the options,

Select Options(Alt+O), Save (S)

saving the options

Executing a C program in Turbo C:

1. Open the C-IDE (Integrated Development Environment) by double click on “Turbo C++ 3.0” which is on desktop.

shortcut to tc

2. To create a new file select File (Alt+F), New (N) [F is the hot key to File option and N is the hot key to New].

creating new file

3. Type the program.

#include<stdio.h>
int main()
{
printf("Hello World");
printf("This is my first program..");
return 0;
}

Simple C program

4. Save the program by selecting File (Alt+F), Save (S) or select F2 (It is the short-cut to save option)

Here the name of C program must be saved with .c extension. (Otherwise takes .cpp as the default file extension)

save1

save2

5.Execute the program by pressing Ctrl+F9.

6. View the output by pressing Alt+F5.

execution1

Output of second execution

execution of C program

8. Maximizing the Turbo C IDE window size (Full screen)

  • Right click on the tool bar of Turbo C IDE
  • Select properties
  • Select “Full Screen” option under “Display Options”.
  • Select OK

maximizing turboc3 window size

maximizing turboc window

Short – cut to Maximize and minimize the Turbo C window is Alt + Enter
Some modifications to the program structure:
The output of first execution is still there, even after the completion of second execution. It may be confusing output while experimenting with the program. We can use “clrscr();” to clear the output generated by previous execution. We can also use “getch();“ to immediately display the output instead of using Alt+F5 to view the output.

In Turbo C writing #include<stdio.h> at the beginning of program is not mandatory to use printf(), scanf(), clrscr() and getch() because these are the default functions of Turbo C compiler.

Modified structure of C program (Turbo C only):

structure of a C program

Previous post:

Next post: