[How To] Compile & Execute a C/C++ Program – C Programming Basics

After the successful Installation of C/C++ Compiler in the root folder, the next step is to compile and execute the C/C++ program. There are various ways to compile & execute the C/C++ Program, but here i am providing a simplest way to start the C programming in a systematic manner. The starting of programming (like how to open the editor through command prompt, how to compile, how to execute etc.) should be systematic otherwise you may face many little problems or errors during the programming of C or C++ language. Just follow the given below step by step tutorial to start C/C++ programming using command prompt, learn how to compile & execute the C/C++ program without leaving the command prompt.C Programming Language

Step By Step Tutorial To Learn Compilation & Execution of C/C++ Program on Command Prompt

Go to command prompt by typing:
windows+ R --> command/cmd
C:\docum~1\user> cd\
C:\> cd tc
C:\tc>cd bin
C:\tc\bin>tc  (Press ENTER Key - TC.EXE File will open)
Now a blue screen will open , this is your IDE
Go to FILE menu and choose NEW (To create new file)
Save this file as program.C  using F2 or go to
FILE menu--> save
(The name of the program must not be greater than 8 characters)
Type the program (Save time to time F2)
After completing the program , now its time to compile the program. 
1.There are 2 things: Compile  & Build All
2.If we compile the program (using ALT+F9)then program.exe will not create.
If we Build the program then program.exe will create in C:\tc\OUT> folder .
So, Build All is perfect rather than Compile only.
Press Alt+F --> FILE menu-->compile -->Build All
After successfully build the program.
Press Alt+F --> FILE menu-->RUN -->run(CTRL+F9).

Finally, I hope this step by step tutorial would be helpful to learn the basics of compilation & execution of C/C++ programs using Turbo C/C++ Compiler on command prompt.


CommentLuv badge