Unit - 0
Unit - 0
Page 1 of 6
CS – 02 Problem Solving Methodologies And Programming In C
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
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.
To mount that driver / directory, click on File - > Dos Shell Option.
This is C
prompt.
This is Dos
Shell. This is
command
base only.
So, we need
to type
mount
command.
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
Search CTRL + L
Trace Into F7
Step Over F8
Compile ALT + F9
Make .exe F9
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