Hello World Program in C Language


Ezoic verification ID =  239204

Write a C program to print all natural numbers from 1 to n

#include <stdio.h>

int main() {
// displays Hello, World! text on the screen
printf(“Hello, World!”);
return 0;

How does the “Hello, World!” program operate?

  • The preprocessor command #include instructs the compiler to include the contents of the program’s stdio.h (standard input and output) file.
  • Functions like scanf() and printf() that accept input and display output, respectively, are found in the stdio.h file.
  • The programme will not build if the printf() method is used without adding #include stdio.h>.
  • The main() function is where a C programme begins to run.
  • A library function called printf() is used to display formatted output on a screen.
  • Printf() in this programme prints the text Hello, World! on the screen.
  • The program’s “Exit status” is indicated by the return 0; statement.
  • The programme closes with this statement, to put it simply.


Tags: No tags

Add a Comment

Your email address will not be published. Required fields are marked *