C hello world program – Tutorialpath

hello world program

How to write a hello world program in C language? To learn a programming language, you must start writing programs in it, and this could be your first C program.

Maximum students of programming languages, start from the ‘Hello World’ code,¬†Let’s have a look at the program first.

Example:

Hello World Program
Hello World Program

Output of program:

Explain Function’s:

  • Library function printf is used to display text on the screen.
  • ‘\n’ places the cursor at the beginning of the next line.
  • “stdio.h” header file contains the declaration of printf function.
  • The execution of a C program starts from the main()¬†function.
  • The return 0; statement is the “Exit status” of the program. In simple terms, program ends with this statement.

 

Check out these related examples:

  • Display its own Source Code as Output
  • Display Factorial Number
  • Display Prime Numbers Between Intervals Using Function
  • Create Pyramid and Pattern
  • Display Characters from A to Z Using Loop
  • Make a Simple Calculator Using switch…case
  • Display Fibonacci Series

2 thoughts on “C hello world program – Tutorialpath

Leave a Reply

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