Hello coders, in this post we will learn how to write hello world program in c language. This is a very basic C program.
As you already know that this site does not contain only c programming solutions here, you can also find the solution for other problems. I.e. Web Technology, Data Structures, RDBMS Programs, Java Programs Solutions, Fiverr Skills Test answers, Google Course Answers, Linkedin Assessment, Leetcode Solutions, and Coursera Quiz Answers.

How “Hello, World!” program works?
- The
#include
is a preprocessor command that tells the compiler to include the contents ofstdio.h
(standard input and output) file in the program. - The
stdio.h
file contains functions such asscanf()
andprintf()
to take input and display output respectively. - If you use the
printf()
function without writing, the program will not compile. - The execution of a C program starts from the main() function.
- printf() is a library function to send formatted output to the screen. In this program, printf() displays Hello, World! text on the screen.
- The return 0; a statement is the “Exit status” of the program. In simple terms, the program ends with this statement.
Hello World Program in C
#include <stdio.h> int main() { printf("hello, world\n"); }
Output
Hello, World!
Hello World Program in C using Functions
#include void hello(){ printf("Hello World"); } int main() { //Calling a function here hello(); return 0; }
Output
Hello, World!
if you want to learn C programming free of cost please visit:
Conclusion
I hope after going through this post, you understand how to write hello world program in c language, if there is any case program is not working and showing an error please let me know in the comment section.