Hello World Programme in C

How to write a sample C program to print Hello World? It is the first program to start any programming language. The “Hello World” program helps to understand the basic programming structure of C Programming. So let see how we can write print Hello World using C language.

 

#include <stdio.h>
int main()
{
printf(“Hello World\n”);
return 0;
}

Output:

Hello World

 

Explanation:

You can see the within the program to print hello world, I have included the “stdio.h“. The “stdio.h” is a standard input-output header file. This file allows you to use standard functions such as printf and scant. If you will not add this header file then we will get a warning. In the mentioned C program, I am using the print function to print my message on the console.

 

 

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *