0% found this document useful (0 votes)
51 views6 pages

Unit - 0

This document provides instructions for installing and using the Turbo C++ compiler to write, compile, and run C and C++ programs. It describes downloading and extracting the Turbo C++ files, running the installer, and locating the tc.exe file to open the compiler interface. It also outlines how to create, save, compile and run a basic program, and use debugging features like breakpoints and watches.

Uploaded by

MIHIR DANGI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
51 views6 pages

Unit - 0

This document provides instructions for installing and using the Turbo C++ compiler to write, compile, and run C and C++ programs. It describes downloading and extracting the Turbo C++ files, running the installer, and locating the tc.exe file to open the compiler interface. It also outlines how to create, save, compile and run a basic program, and use debugging features like breakpoints and watches.

Uploaded by

MIHIR DANGI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

CS – 02 Problem Solving Methodologies And Programming In C

How to Install Turbo C++


 There are so many compilers for C / C++. We can use any of them to run our C Program.
 We are using Turbo C++ as it can be used for both C and C++.
 To use Turbo C++ software,
o First, download this software. You can Google for the same and get setup.
o Extract zip file in specific drive / directory. (Let’s say C:\turboc)
o Select install.exe file and double click to install software.

o Click on ‘Next’ Button. And then Click on ‘Install’ Button.

o It will start installation of turboC++ software.

Page 1 of 6
CS – 02 Problem Solving Methodologies And Programming In C

o And finally click on ‘Finish’ button.

o After successfully installation of software, double click on the file tc.exe located inside bin
folder of C:\turboc.

Page 2 of 6
CS – 02 Problem Solving Methodologies And Programming In C

Using TurboC++ Software


 As displayed above, after double clicking on tc.exe file it will open following screen.

Page 3 of 6
CS – 02 Problem Solving Methodologies And Programming In C

 Now click on File Menu and then New Option will open following screen.

 From here you can type, compile, save and run your C / C++ Program.

Mount Specific Directory


 To save C / C++ Program in specific drive / directory, we need to mount that driver / directory.

 To mount that driver / directory, click on File - > Dos Shell Option.

 It will display following screen with C:\ prompt.

This is C
prompt.
This is Dos
Shell. This is
command
base only.
So, we need
to type
mount
command.

 Type mount command here like:


Page 4 of 6
CS – 02 Problem Solving Methodologies And Programming In C

o mount x: z:\sem1\c

 Here mount is command name, x is name of our virtual name for our path. We can set any of
alphabet except our Computer’s drive letter.

 Z:\sem1\c is the particular folder path where we want to save our C program.

SHORTCUT KEYS
Open any Menu ALT + Red Color Font Letter (Alt + F = File Menu) OR F10

Open F3

Save F2

Quit ALT + X

Undo ALT + Backspace

Redo SHIFT + ALT + Backspace

Cut SHIFT + Delete

Copy CTRL + Insert

Paste SHIFT + Insert

Clear CTRL + Delete

Search CTRL + L

Run Program CTRL + F9

Trace Into F7

Step Over F8

Compile ALT + F9

Make .exe F9

Toggle Breakpoint CTRL + F8

Add Watch CTRL + F7

Next F6

Close ALT + F3

Zoom F5

Page 5 of 6
CS – 02 Problem Solving Methodologies And Programming In C

Tracing / Debugging
 To trace / debug means step-by-step evaluation / execution of any program.
 C compiler executes program from top – to – down approach.
 We can trace / debug each any every instruction / step of our program.
 We can also check value of variable / expression for each and every step of program execution.
 To debug complete program, we need to compile and press F7 key. It will start step-by-step
execution of program.
 In many cases, there may be situation that compiler starts execution of program as its own and
after some steps of execution we need that compiler will suspend execution till we give next
instruction.
o For this, we need to set breakpoint at specific point.
o To create breakpoint, press F8 key at any of the line of code.
o Now, start normal execution of program (i.e. compile and CTRL + F9).
o Whenever compiler reaches to our breakpoint it suspends execution till next instruction.
o To resume execution step-by-step, press F7 key, it will start execution of the program step
by step from the breakpoint.
 We can also add Watch for our program while tracing / debugging.
o In C language, watch is the functionality which shows us the runtime valuation of a variable
/ expression that we added to watch.
o To add any variable / expression to watch, press CTRL + F7 key.

Page 6 of 6

You might also like