How to Execute a C program using Notepad++

Have you ever thought that you could write a C program in Notepad and execute it without the use of the traditional C language software.  Then, the Notepad++ software provides you with the solution.

Notepad++ is a source code editor that replaces the traditional Notepad.  It supports a wide variety of programming languages like C, C++, C#, java, Cobol, HTML, shell programming etc. in this tutorial, we will guide you on how to Compile and run a C program using the Notepad++ software.

Requirements:

The Notepad++ software.

An External Compiler called Dev-C++


Download the above software from the following links

Notepad++ download

Dev-C++ download

The following section describes you with a step-by-step instruction of how to install the Notepad++ software on Windows operating system

1) Download the Notepad++ software from the above mentioned link.

2) Click on the npp.exe file to start the installation process.

3) In the next step, select the language that you wish to use throughout the installation process and click on OK.


4) In the Notepad++ setup wizard thus opened, click on the Next button to continue the installation process.

5) In the next step of the wizard, you have to accept the License agreement by clicking on the I Agree button.

6) In the next step, you have to choose a location or a destination folder where you would like to install the software. Select a location of your wish using the Browse button and click on the Next button.

7) In the next step of the Wizard, click on the Install button.

8) The installation process will take a few seconds to complete and during the course of installation, the following progress window will be displayed on your screens.

9) Once the installation is complete, click on the Finish button.

Similarly, install the Dev-C++ compiler using the following steps

1) Download the software from the above mentioned link.

2) After downloading, click on the devcpp.exe file to start the installation process.

3) Select the language of installation and click on OK.


4) In the next step, accept the License agreement by clicking on the I Agree button.

5) In the next step, click on the Next button to continue with the installation process.

6) In the next step, select the directory where you would like to install the Dev-C++ compiler. Use the default directory that is recommended by the installation wizard and click on the Install button.

7) The installation process may take a few minutes to complete and once the installation is complete, click on the Finish button.

If you are installing the compiler for the very first time, then you should carry on with some additional steps to configure the compiler.

8.      Once you click on the Finish button, a Dev-C++ first time configuration window appears on your screen. In this window, click on the Next button.

9) In the next step, select the radio button that says No, I prefer to use Dev-C++ without it and click on the Next button.

10) In the next step, click on OK to configure the compiler successfully.

Now, as you have both the software ready with you, the next thing is to execute a C program in the Notepad++ with the help of Dev-C++ compiler. The following steps show you how.

1) Launch the Notepad++ application by clicking on the Notepad++ icon present on the Start menu.


2) In the Notepad++ main window thus opened on your screen, click on the File tab and select New. This will open a new document on your screen where you can write the C program.

3) In the next step, you have to select the language in which you want to write the program. To select the C language, click on the Language tab and then point you mouse over C and select C from the context menu.

4) In the next step, write the C program that you wish to execute in the Notepad++. In our illustration, we are choosing a simple C program that prints the text blog.itechtalk.com as the output. See the snapshot below for details.

5) In the next step, you have to save the program. To do so, click on the File tab and select Save As from the context menu.

6) In the Save As dialogue box thus opened, click on the Save as type box and select C source file (*.c) as the file extension and click on the Save button.

7) Now, click on the Run tab and then select Run from the drop down menu. This will open up the Run dialogue box on your screens.

8) In the Run dialogue box, click on the Browse button to select the program file that you saved in the step 6 above.

9) In the window thus opened, select the file that you saved and click on Open.


10) In the next step, in the Run dialogue box. Click on the Run button. This will open up your C program in the Dev-C++ compiler.


11) In the Dev-C++ compiler, click on the Execute button and then select Compile from the context menu. This will compile your C program and display any errors if present at the bottom of the window. See the screenshots below for details.

12) If the compilation process is successful, you will see the following dialogue box on your screen. Click on the Close button to exit from the dialogue box.

13) Now, you have to Run the program. To do so, click on the Execute tab and select Run from the drop down menu.

14) Now, you should see the output of your program on your screen which will appear as follows.

I know you can’t wait any longer to execute this on your system using the Notepad++.

Filed in: Misc

You might like:

How to add/create a new user account in Windows 8. How to add/create a new user account in Windows 8.
How to Clear App History in Windows 8 How to Clear App History in Windows 8
How to change your Password in windows 8 Operating System How to change your Password in windows 8 Operating System
How to unlock (SIM) on Samsung Galaxy Pop(mini) , Gio How to unlock (SIM) on Samsung Galaxy Pop(mini) , Gio

7 Responses to "How to Execute a C program using Notepad++"

  1. Murugan R says:

    In the last section when clicking RUN after selecting the c program, devcpp is not executing automatically. It is require any configuration? Please …

  2. atila says:

    unfortunatly two links are same and notepad
    please fix it
    tanks

  3. neo says:

    It is use full information but….I want to say that If a programmer is using Dev-c/c++ then …I think…..there is no need to use Notepad++ coz Dev-c/c++ itself provide an editor console also as well as compiler to run C/C++ programs.

  4. Lening Lukram says:

    Thanks to the notepad ++. Please make for the mobile in next product. So, that it can be use in mobile. As a mobile c, c++, c#, java programming language. May god bless u.

    • Sahana says:

      Even i thought the same. when i read ur comment i got it confirmed that we can write the source code in the devc/c++ editor and compile it. And yes it works fine.

  5. alex says:

    the installation guides is very helpful to me, thank a lot…

Leave a Reply

Submit Comment

© 2014 Technology Blog. All rights reserved. XHTML / CSS Valid.sikiş
Proudly designed by Theme Junkie.