Hello World Program In C Programming Language
- Get link
- X
- Other Apps
Hello World Program In C Programming Language
In todays blog post we will look at C programming language. We will cover some basic introduction about C programming language. And then we will see what are the uses of C programming in real world. And after that we will simply make a hello world program in C programming language in visual studio community 2026 IDE.
Basic Introduction Of C Programming Language
C programming language is a general purpose programming language. It is procedural and structured programming language. The C language is in use for nearly 50 years. It was created by Dennis Ritche at AT&T Bell labs in 1970s. C programming language is very powerful, it helps us developing Operating Systems, Databases, Applications, etc. C programming language is used to develop system applications that directly interact with hardware devices like drivers, kernels, etc.
Uses Of C Programming Language
The C programming language is very versatile and powerful. It is used to create programs that needs to run very fast and works closely with computers. Following are some main uses of C programming language.
1) With the help of C programming we can develop operating systems, like parts of windows, linux, and macOs.
2) We can build programs that are used in devices like TVs, Cars, and home appliances.
3) By using C programming language we can also build databases and system tools.
4) We can also make libraries that other programming languages use with in their programs.
Basic Syntax Of C Programming Language
Now we will look at basic syntax of C programming language. In a C program we have some basic criteria or set of rules that we have to follow strictly so that the compiler can understand the code and execute it successfully. Following are the components that a C program should contain so that it runs smoothly.
1) In C program we use header files with the help of which we can use some functions with in our C program, these functions are written inside these header files. We can include these header files in our program by using the #include directive like this e.g
#include<stdio.h>
2) After that we have a main() method in our C program. And remember that this main() method is the entry point with in our C program. Because the C compiler will look for this main() method and begins the execution of the program from the first line of this main() method like this e.g
void main()
{
//code to be written here
}
For now keep these two above points in your mind. And now we will look at simple hello world program in C programming language.
Hello World Program In C Programming Language
#include<stdio.h> void main() { printf("Hello World"); _getch(); }
In the above C programming code the result would be a simple message to show on the console screen which is simple Hello World message. If we look at the code, in the first line we have used the #include directive in order to reference stdio.h header file like this
#include<stdio.h>
We used this reference file because it helps us in performing input and output operations with in our C program. After that we have a main() method which is entry point to our C program. And with in this main() method we have used printf() function which will print hello world message to the console screen. And after that we have simply used _getch() function to hold or pause the screen so that the console screen would not disappear after successful execution of the program. And the console screen will disappear only if we press any key from the keyboard. And remember that both of these functions printf() and _getch() are defined in stdio.h header file that we included at the at the very first line of our C code.
Congratulations! Like always we have successfully implemented the Hello World program in C programming language.
- Get link
- X
- Other Apps
Comments
Post a Comment