Basic

Hello world program in C programming language

Hello world program in C programming language

C “Hello world”program

In this tutorial, we will discuss Hello world program in C programming language

Hello World

Hello, word program is a very simple program for beginners in C language with few lines of coding and is easy to understand.

If you want to run this program on your system, you must have a text editor and compiler of C language.

Program display hello world

#include <stdio.h>//header file for stranded input output 


int main()//main method in C language
{
    printf("Hello world!\n");//display statements
    getch();
    return 0;//return statements
}

When the above code is executed, it produces the following results:

Hello world!

Part of this program

We can divide the program of 5 section for easy to understand the program flow

 

  • Header file
  • Main function
  • Some pre-defined functions
  • return statement

Header file

#include<stdio.h> is a header file for standard input and output library functions. The print() and scanf() pre-defined functions are defined in this header file

 

Main function

void main() – This is the main function in C Language. the void is a return statement and void never returns a value. main() is the main method and it indicates the start of execution of the program. So main is the Entry point to the every C program.

 

Some pre-defined functions

getch()- used to clean the screen

 

Return statements

return 0; – This is the ending point of every C Program

 

Similar post

Hello world in Java

Hello world in C++

Hello world in Python

Hello world in C#

 

Suggested for you

for loop in Java

while loop in Java

for loop in C language

while loop in C language

while loop in cpp language

For loop in Cpp language

Nested for loop in C++ language

Nested for loop in Java language

Nested for  loop in C language

Nested for loop in Python language

 

Introduction of Python programming language
C program gets() and puts() function
Karmehavannan

I am Mr S.Karmehavannan. Founder and CEO of this website. This website specially designed for the programming learners and very especially programming beginners, this website will gradually lead the learners to develop their programming skill.

View Comments

Recent Posts

C# inverted full pyramid star pattern

C# inverted full pyramid star pattern In this article, we will discuss the concept of…

3 weeks ago

C# Full Pyramid star pattern program

C# Full Pyramid star pattern program In this article, we will discuss the concept of…

1 month ago

Program to count vowels,consonants,words, characters and space in Java

Program to count vowels, consonants, words, characters and space in Java In this article, we…

1 month ago

How to print multiplication table using Array in C++ language

How to print multiplication table using Array in C++ language In this post, we will…

1 month ago

C Program to multiplication table using Array

C Program to multiplication table using Array In this tutorial , we will discuss about…

2 months ago

Java program to check odd or even using recursion

Java program to check odd or even using recursion In this tutorial, we discuss a…

2 months ago