The “Hello World” program is the first step towards learning any programming language and also one of the simplest programs you will learn. To print the “Hello World”, we can use the printf function from the stdio.h library that prints the given string on the screen.

C Program to Print “Hello World”

#include <stdio.h>

 int main() {

printf("Hello World");

return 0;

}

Output :

Hello World

Explanation:

  • #include <stdio.h> – This line includes the standard input-output library in the program.
  • int main() – The main function where the execution of the program begins.
  • printf(“Hello, World!\n”); – This function call prints “Hello, World!” followed by a new line.
  • return 0; -This statement indicates that the program ended successfully.