First C Program

C is a popular general-purpose programming language that is widely used for system programming, embedded systems, and application development. In this tutorial, we will learn how to write our first C program and how to compile and run it using the Turbo IDE.

Step 1: Download and Install Turbo IDE

The first step is to download and install the Turbo IDE on your system. You can download it from the official Borland website. Once downloaded, run the setup file and follow the instructions to install it.

Step 2: Launch Turbo IDE

Once Turbo IDE is installed, launch the program by double-clicking on the desktop icon or by searching for it in the Start menu.

Step 3: Create a New Project

To create a new project, go to the File menu and select New Project. In the New Project dialog box, select "Console Application" and click OK.

Step 4: Write the Code

In the Turbo IDE, a new file will be created for your project. This file will have the ".c" extension. Type the following code in the file:

In this program, we use the printf function to output the message "Hello, World!" to the console. The return 0 statement at the end of the main function indicates that the program has completed successfully.

Step 5: Save the File

Save the file by going to the File menu and selecting Save. Choose a name for your file and make sure it has the ".c" extension.

Step 6: Compile the Program

To compile the program, go to the Run menu and select Compile or press the F9 key. If there are no errors in your code, the program will be compiled successfully.

Step 7: Run the Program

To run the program, go to the Run menu and select Run or press the Ctrl+F9 key. You will see the output "Hello, World!" printed to the console.

In this tutorial, we learned how to write our first C program and how to compile and run it using the Turbo IDE. Now that you have a basic understanding of how to use the Turbo IDE, you can start exploring the vast possibilities of C programming. Happy coding!