Hello World Program in C

In this example, you will learn how to print the 'Hello World' program in C. This program prints 'Hello World'  on the output screen when executed.

C Hello World program

  void main() {
  // printf() displays the string inside quotation
  printf("Hello World!");


hello world!

explanation of hello world program

  • The #include is a preprocessor command that tells the compiler to include the contents of stdio.h in your c file
  • The execution of a C program starts from the main() function.
  • stdio.h file contains many functions such as printf() and scanf()
  • you must always need to include the header file(stdio.h) before using printf() and scanf()
  • printf() function use to send the data to your output screen and scanf() the function gets data from the keyboard