c
  1. c-hello-world-program

Hello World Program in C

Example

#include <stdio.h>

int main() {
   printf("Hello World!");
   return 0;
}

Output

Hello World!

Explanation

The printf function is used to print the string "Hello World!" to the console. The return 0; statement at the end of the main function indicates that the program terminated successfully.

Use

The "Hello World" program is often used as a simple test to ensure that a new programming environment is set up correctly. It is also used as an introductory example in many programming textbooks and tutorials.

Summary

The "Hello World" program in C is a simple program that prints the string "Hello World!" to the console. It is often used as an introductory example in programming tutorials and as a simple test to ensure that a programming environment is set up correctly.

Published on: