27 October 2013

Coding in C using Dev-Cpp IDE

Greetings, fellow coders.

Today, I am going to show you an open-source application which enables easy coding and compiling of C programs. It is named Dev-Cpp or Dev-C++, which can be used as an IDE(Integrated Development Environment) to code and to compile C++ as well as C programs.

You can get a free copy of it here :  http://www.bloodshed.net/dev/devcpp.html

After you downloaded and installed Dev-Cpp on your computer, run the devcpp.exe file.

After the splash screen you will see :


Simply close the Tip of the Day window and we shall continue.

At the top left of Dev-Cpp, you will see the File menu, click on it to start a new Project or Source.

Let's try to create a C source file.
Click on File>New>Source File. A new tab will open up, like this :



Now type in this code to the code editor:
#include <stdio.h>
#include <stdlib.h>

int main(){
 printf("Hello World\n");
 system("Pause"); 
 return 0;  
}
 Done? Now click the Execute menu and choose Compile & Run or simply press F9.
 It will then ask you to save the source file first. Just save it wherever you desire, but make sure it is in the C source files (*.c) format.
 After saving, a window will show up, looking like this :



Congratulations, you have successfully created a C program using Dev-Cpp !

On the next few posts, I will be giving tutorials on creating C programs with this user-friendly IDE.




Happy Coding,
Cyber Frost

No comments:

Post a Comment

Search