Are you want to start with C programming language, then let’s start it with your first “Hello world” program in C language. Follow the below steps to create, compile, and run the first C program.
1) Make Entry of TC>bin inside Path Variable and Click on OK.
C:\TC\BIN
2) Open your favorite editor and copy paste below code to execute your first C program.
1 2 3 4 5 6 7 8 | //C hello world example #include <stdio.h> int main() { printf("Hello world\n"); return 0; } |
3) Now Open Command Prompt by typing cmd inside “Run” Option.
4) Go to Path Where you have Saved your C Programs.
D:\>cd C Programs
D:\C Programs>
5) Suppose we have Saved hello.c program inside “C Programs” folder. then type this command to Compile hello.c
D:\C Programs>tcc hello.c
6) After typing “tcc command” we can compile C Program.
7) Now it’s time to run C Program after Successful Compilation.Just Type Program name and Hit Enter you will get output on the console
D:\C Programs>hello
Below is the output of your above program.
1 | Hello world |
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.
Article Tags: c first program, c hello world, c hello world program, first program in c, hello world c program, hello world c programming, my first c program