Hello World C Program

The Hello World C program is a simple C program that prints hello world. ‘Hello World’ program is the traditional first program for beginners who are going to learn any programming language.

Writing the Hello World C Program

To write the Hello World C program, we need a text editor and a C compiler. You can use any text editor according to your preference and write hello world program in C language.

Let’s create a file named HelloWorld.c and write following C code that prints hello world.

#include<stdio.h>

void main()
{
    printf("Hello World!!");
}
Hello World C Program

Breaking Down Hello World C Code

  • #include<stdio.h>, is a pre-processor directive that tells the compiler to include the stdio.h header file.
  • The main() function is the entry point for all C programs. for every c program execution starts with main() function.
  • The printf() function prints the message “Hello World!!” to the console. The printf() function is available in stdio.h header file

See Also

1 thought on “Hello World C Program”

Leave a Comment