Write a C Program to Print Hello World Program

By | 02.10.2016

C Program to Print Hello World Program

Write a C Program to Print Hello World Program. In this program ,we just print the “Hello World!” line on the computer screen.

This is the basic Example for the beginners of C Programming Language….Let’s have a look at the program below :

A C program basically consists of the following parts −

  • Preprocessor Commands
  • Functions
  • Variables
  • Statements & Expressions
  • Comments


Let us look at a simple code that would print the words “Hello World” −


int main() {

printf("Hello, World! \n");

return 0;

Let us take a look at the various parts of the above program −

  • The first line of the program #include is a preprocessor command, which tells a C compiler to include stdio.h file before going to actual compilation.

  • The next line int main() is the main function where the program execution begins.

  • The next line /*…*/ will be ignored by the compiler and it has been put to add additional comments in the program. So such lines are called comments in the program.

  • The next line printf(…) is another function available in C which causes the message “Hello, World!” to be displayed on the screen.

  • The next line return 0; terminates the main() function and returns the value 0.

Compile and Execute C Program : :

Hello, World!

Above is the source code for C Program to Print Hello World Program which is successfully compiled and run on Windows System.The Output of the program is shown above .

If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.

Thanks for reading the post….

3.6 16 votes
Article Rating
Category: Basic Programs C Programming Tags:

About Tunde A

My name is Tunde Ajetomobi, a Tech Enthusiast and Growth Hacker. I enjoy creating helpful content that solves problem across different topics. Codezclub is my way of helping young aspiring programmers and students to hone their skills and find solutions on fundamental programming languages.

Notify of

Inline Feedbacks
View all comments