'Hello World' Program in C
A simple C program to display 'Hello World' on output screen. It's a very simple program to illustrate the syntax of a programming language and usage of'PRINTF() Function in C Language'.

To better understand the use of Printf() check the Below Blog :
C Programming Input Output (I/O) Functions : printf() and scanf()
C Program to Display 'Hello World'
#include <stdio.h>
void main()
{
printf('Hello World');
}{
printf('Hello World');
Output
Hello World
Line by Line Execution :
- The
#include<stdio.h>is a preprocessor command. This command tells compiler to include the contents ofstdio.h(standard input and output) file present in the complier into the program. - The
stdio.hfile contains functions such asscanf()to take input andprint()display output respectively. - If you use
printf()function without writing#include <stdio.h>, the program will not be compiled. - The execution of a C program starts from the
main()function. - The
printf()is a library function to send formatted output to the screen. In this program, theprintf()displays 'Hello World' text on the screen. - As the
main()function is of VOID type thusmain()function the will not return any value and directly display the output on output window.
No comments:
Post a Comment