Hello World Program in C

Hello World! program is used to start learning any programming language. This simple hello world program is written in C programming language. This simple program just print ‘Hello World!’ string on the output screen. We tried to explain each code line with comments. At the end we shown the expected output of this code.

[js]

#include <stdio.h> // This line includes stdio (C standard library for input and output functions)

// main function definition. At least one main function is required in every C program
// All C programs start execution from main function
// Here int means that main function will return an integer number, void means that this
// main function doesn’t accept any input arguments

int main(void){
printf("Hello World!"); // printf function is used to output some text on screen
return 0; // return value of main function
}
[/js]

Output:

2 thoughts on “Hello World Program in C

Leave a Reply to Arushay Cancel reply

Your email address will not be published. Required fields are marked *