Now We Get Started With C
![]() |
How To Run C Program In Pc? |
- A text editor, like Notepad, NotePad++, to write C code
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):
firstprogram.c
#include <stdio.h>
int main() {
printf("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:
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 motionsmag.com, 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:
secondprogram.c
int main() {
printf("Hello Motionsmag");
return 0;
}
Result:
Hello Motionsmag
Post a Comment