C language Hello world Program

C language Hello world Program

In this article, we will discuss the concept of C language  in Hello world program.
C Hello World Program Explanation

Here, this is C Language “Hello world” program, Generally Hello world program is the first program for C language beginners. We can write this program using very simple coding and a few lines.

We can use the code:: block IDE to run and compile C Programming Language.
Before we execute the first program in C language, we need to know How to download and install code:: block and how to use it to execute in C Language.

We can download Code:: block  using this link code:: block

After downloading and installing code:: block on our computer, we can write our first C program(Hello world program).

C Hello world program

program 1

#include <stdio.h>
#include <conio.h>

int main()
{
printf("Hello world!n");
getch();
return 0;
}

every program includes following sections

  • Some header files
  • Some pre-defined function
  • Return statement

1. #include <stdio.h>  – This is a header file, it includes standard input and output library functions. The prints() pre-defined function  that is defined in this header file.

2. #include <conio.h>  – This is a header file, it includes console input and output library functions. The getch() pre-defined function is defined in this header file.

3. #include <stdlib.h> –  This is a header file, it includes some standard library functions.

4. void main() –  This is the main function in C Language. The void is returned as a statement as void never returns value main() in the main method. It is an indication for starting the program execution. So maint is an entry Point to every C program.

5. print() – It is a pre-defined function for display output. This function definition includes the   #include <stdio.h> header file

6. return 0; – This is the ending point to every C Program.

Example and output

How to run and compile the C Program in code:: block

Write the C Program in the Code block

Example

Two ways that are available to execute the C program

1. Go to menu bar and then click on “build menu” and then select “Build and run”
2. Click F9 key in the keyboard

 

Run and compile C hello world file

Related post

C++ Hello world program

Hello world in java

Hello world in Python

 

Karmehavannan

Recent Posts

Using function or method to Write temperature conversion : Fahrenheit into Celsius

Using Function or Method to Write to temperature conversion: Fahrenheit into Celsius In this article,…

11 months ago

Function or method:temperature conversion from Fahrenheit into Celsius – Entered by user

Function or method of temperature conversion from Fahrenheit into Celsius In this article, we will…

11 months ago

Write temperature conversion program: Fahrenheit into Celsius

Write temperature conversion program: from Fahrenheit to Celsius In this article, we will discuss the…

11 months ago

How to write a program to convert Fahrenheit into Celsius

How to write a program to convert Fahrenheit into Celsius In this article, we will…

11 months ago

Function/method to convert Celsius into Fahrenheit -Entered by user

Function/method to convert Celsius into Fahrenheit -Entered by user In this article, we will discuss…

11 months ago

Temperature conversion: Celsius into Fahrenheit using function or method

Temperature conversion: Celsius into Fahrenheit using a function or method In this article, we will…

11 months ago

This website uses cookies.