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

Multiply two numbers in Java using scanner| 5 different ways

Multiply two numbers in Java using scanner| 5 different ways In this article, we will…

3 months ago

5 different ways to Divide two numbers in Java using scanner

5 Different ways to Divide two numbers in Java using scanner In this article, we…

3 months ago

Learn 8 Ways to Subtract Two Numbers Using Methods in Java

Learn 8 Ways to Subtract Two Numbers Using Methods in Java In this article, we…

4 months ago

10 ways to subtract two numbers in Java

10 ways to subtract two numbers in Java In this article, we will discuss the…

4 months ago

Java Code Examples – Multiply Two Numbers in 5 Easy Ways

Java Code Examples – Multiply Two Numbers in 5 Easy Ways In this article, we…

4 months ago

How to Divide two numbers in Java| 5 different ways

How to Divide two numbers in Java| 5 different ways In this article, we will…

4 months ago

This website uses cookies.