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
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.
How to run and compile the C Program in code:: block
Write the C Program in the Code block
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
Related post
C++ Hello world program
Hello world in java
Hello world in Python
Subtract two numbers using method overriding Program 1
PHP Star triangle Pattern program Here's a simple Java program that demonstrates how to print…
Using Function or Method to Write to temperature conversion: Fahrenheit into Celsius In this article,…
Function or method of temperature conversion from Fahrenheit into Celsius In this article, we will…
Write temperature conversion program: from Fahrenheit to Celsius In this article, we will discuss the…
How to write a program to convert Fahrenheit into Celsius In this article, we will…
This website uses cookies.