“Hello World!” in C programming
A simple program C to display “Hello, World!” to run. It is a very easy and simple program, it is often used to illustrate the syntax of a programming language for run programs.
Program to Display “Hello, World!”
#include <stdio.h>
int main()
{
// printf() displays the string inside quotation
printf("Hello, World!");
// Exit status
return 0;
}Output
Hello, World!
How “Hello, World!” in c – program works ??
#include <stdio.h>:: = standard input and output.The #include is a preprocessor command. It is tells compiler to include stdio.h file in the program.
The stdio.h file also contains functions such asprint()andscanf()to take input and display output respectively in program.
NOTE : If we useprintf()function without using#include, the program will not be compiled/run.main():: The execution of a C program starts from the main() function.printf():: Theprintf()is a library function. it is use to send formatted output to the screen. In this program, theprintf()will displays “Hello, World!” text on the screen.- return 0 :: The return 0; statement is the “Exit status” of the program. In simple terms, program end/exit/quite with this statement.