C Tutorial

How to make Hello World Program in C

Hello world program
Written by Faiz.ul.Hassan

we will Start our C Language with basic program of c hello world program i.e Write Hello World on Console screen

that is task we will complete in few lines

// A hello world program in C Language

#include<stdio.h>  // Header file

int main()                 //Main Fuction
printf(“Hello World”);           //printf function is used to print some thin on screen
return 0;

We will discuses line by line in this article


#include<stdio.h>  is header file in this line # means that indicate that file compiler directive and stdio.h is file name is that we want to used in our program and the extension of any header file in .h

 main(): Ever language have main() function. A program always starts with the main() function and every program must have main(). Here void is the return type of this function. It means main function does not any thing return. The opening curly braces { and closing curly braces } that shows the body of the function inside we write code that is to executed outside fro that function code could not execute if does not link present inside the main function.

That is Know as main() function

3. printf():  printf() is another function. This is mostly used for print the values,string on the screen. For Example

printf(“programergeek.com is best website for learn programming”);

4. Semicolon (;) is used for the termination of statement. It is also called statement terminator in C Language.


About the author


Leave a Comment