First C Program

Categories: C Programming language

Before starting the abcd of C language, you need to learn how to write, compile and run the first c program.


To write the first c program, open the C console and write the following code:


#include <stdio.h>    

int main(){    

printf("Hello C Language");    

return 0;   

}  


printf() The printf() function is used to print data on the console.


return 0 The return 0 statement, returns execution status to the OS. The 0 value is used for successful execution and 1 for unsuccessful execution.


How to compile and run the c program

There are 2 ways to compile and run the c program, by menu and by shortcut.


By menu

Now click on the compile menu then compile sub menu to compile the c program.


Then click on the run menu then run sub menu to run the c program.


By shortcut

Or, press ctrl+f9 keys compile and run the program directly.

You will see the following output on user screen.

Top Blogs
C Functions ! What is a Function Published at:- Types of Function in C ! Library Function in C ! User Defined Function In C ! Function Definition Published at:- Functions that return multiple values -C Example Published at:- Functions with arguments and return values -C Examples Published at:- Functions with arguments and no return values. Published at:- Example of Function with no return type and no argument Published at:- Loops in C Published at:- Structure in C: Introduction Published at:- C Memory Management ! Dynamic memory allocation Published at:- Learn C Programming language with example Published at:- C Interview Questions And Answers Published at:- What values are printed when we run following? Published at:- C Program example: Input a number and print sum of its digits Published at:- Pointer declaration in C ,Address operator Published at:- C Language Interview Question and Answers Published at:- Benefits of C language over other programming languages Published at:- History of C Language : Introduction to C Programming Language Published at:- How does C Programming Language Work Published at:- Importance of C Programming Language Published at:- Input and Output Functions in C Published at:- Introduction to Implementation of Queue using Linked List Published at:- First C Program Published at:- Inception Of C Language Tutorial for Beginners Published at:- The C Compiler work in C language and its important Published at:- Program Structure with “Hello World” Example Published at:- C Programming Interview Questions Set 1 Published at:- C Programming Interview Questions Set 2 Published at:- C Programming Interview Questions Set 3 Published at:- C Programming Interview Questions Set 4 Published at:- C Programming Interview Questions Set 5 Published at:- C Programming Interview Questions Set 6 Published at:-
R4Rin Team
The content on R4Rin.com website is created by expert teams.