Saturday, 25 August 2012


Using command prompt and accessing DOS shell in Turbo C compiler



This post is related to running a simple c/c++ program using DOS shell. 


All these years, we've used TurboC/C++ compiler to run our c/c++ program by using:
-> COMPILE->alt+f9
-> RUN->run+f9.

Follow the below steps to run your c/c++ program using DOS shell->
  1. Open turboc

  2. File-> New-> SaveAs-> AMIT1.C
(click on the image)


  3. Write any program, add two numbers program is shown here for simplicity.    


4.  File-> Save (or press F2)  


5.  Now, compile this program first to create it’s exe file.      press->alt+f9 


6.  The most important step, how to reach DOS shell->   

      File -> DOS shell

 7.  DOS shell will open (below)



8. Now enter->  

       AMIT1.exe (name_of_the_file.exe, as we compiled it before) , press ENTER.

      You can see the ouput here i.e. 5 + 10 = 15    




  11.  Write EXIT->       Press ENTER

  12. You’ll be returned to the same blue screen(where your program is visible)..
         Please give your views…Enjoy….


Please comment and forward to others if you like this.
Other posts with video tutorial yet to come.....
"I am sure that blogs really help people around the world.
Let us follow this simple thinking of sharing knowledge . . ."

No comments:

Post a Comment