top of page

Instructions:

​

     Download and install Turbo C from the uniform resource locator (URL) listed in the Resources section of this article if you do not already have it installed on your computer.



     Open a new file in your text editor and save to your computer's local drive with the name "HelloWorld.c".



     Copy the following code into the blank document saved in step 2. This code will output "Hello World" to the console window on your computer once it is compiled and run.

     #include <stdio.h>
     main()
     {
     printf("Hello, World!");
     }

​

     Open the command prompt on your computer by selecting the "Start" menu and type "command" in the search text box followed by the "Enter" key. Change the location of your location in the DOS prompt to that where you saved the "HelloWorld.c" file. In this example, the file is saved at "c:\cprograms," and the DOS command is "cd c:\cprograms" followed by the "Enter" key on your keyboard.

​

     Type "c:\Borland\BCCXX\Bin bcc HelloWorld.c" at the DOS prompt and hit the "Enter" key on your keyboard. The XX represents the version of Turbo C that you downloaded. For example, "BCC30" is the directory name for Turbo C 3.0.

​

     Type "HelloWorld.exe" at the command prompt followed by the "Enter" key. You will see "Hello World" displayed on your DOS console.

​

 

​

Things You'll Need :



Turbo C Compiler

How To Use Turbo C

bottom of page