How To Run C Program In Pc?

  Now We Get Started With C

How To Run C Program In Pc?
How To Run C Program In Pc?

We start using C, you need two things:

  • A text editor, like Notepad, NotePad++, to write C code
  • Any compiler, like GCC, to translate the C code into a language that the computer will understand.

Lets C Quickstart

Let's create first C file.

Open Codeblocks and go to File > New > Empty File.

Write the following C code and save the file as firstprogram.c (File > Save File as):


#include <stdio.h>
int main() {
"Hello Eveyone!");
return 0;


Don't worry if you Can’t understand the code above – Then we will discuss it in detail in later lessons. For now, focus on how to run the code.

In the Codeblocks, it should look like this:

Then, go to Build > Build and Run to run (execute) the program. The result will look something to this:

Hello Everyone!
Process returned 0 (0x0) execution time : 0.011 s
Press any key to continue.

Congratulations! You have now written and executed your first C program, In this Toturial.

Learning C At Motionsmag

When we learning C at, you can use our "Try it Yourself" tool, which shows both the code and the result. This will make it easier for you to understand every part as we move forward:


#include <stdio.h>
int main() {
  printf("Hello Motionsmag");
  return 0;

Hello Motionsmag

Post a Comment

Post a Comment (0)

Previous Post Next Post