“Hello World!” in C programming

A simple program C to display “Hello, World!” to run. It is a very easy and simple program, it is often used to illustrate the syntax of a programming language for run programs.

Program to Display “Hello, World!”

Output

Hello, World!

How “Hello, World!” in c – program works ??

  • #include <stdio.h> :: = standard input and output.The #include is a preprocessor command. It is tells compiler to include stdio.h file in the program.
    The stdio.h file also contains functions such as print() and scanf() to take input and display output respectively in program.
    NOTE : If we use printf() function without using #include, the program will not be compiled/run.
  • main() :: The execution of a C program starts from the main() function.
  • printf() :: The printf() is a library function. it is use to send formatted output to the screen. In this program, the printf() will displays “Hello, World!” text on the screen.
  • return 0 :: The return 0; statement is the “Exit status” of the program. In simple terms, program end/exit/quite with this statement.