Hello world program in C programming. In this tutorial, you will learn how to write the hello world program in C programming language using different ways.
The following program printing Hello World!
on the output
screen.
#include<stdio.h>
#include<conio.h>
void main()
{
printf("Hello World!");
getch();
}
The following program also printing Hello World
in one line on
the output screen.
#include<stdio.h>
#include<conio.h>
void main()
{
printf("Hello");
printf("World!");
getch();
}
The following program printing Hello World
in two lines on the
output screen.
#include<stdio.h>
#include<conio.h>
void main()
{
printf("Hello \nWorld!"); //\n
used for goto New Line
getch();
}
The following program also printing Hello World
in two lines on
the output screen.
#include<stdio.h>
#include<conio.h>
void main()
{
printf("Hello \n");
printf("World!");
getch();
}