Hello World Program - C Language
Below is a simple program printing Hello World in C language.
The Hello World program is the first program in any programming language, which is created to check if the basic setup and installation completed successfully or not.
#include <stdio.h>
int main()
{
printf("Hello World");
return 0;
}
Hello, World
Run Code →
printf()
is a system defined function under the header file stdio.h, used to print data onto the screen
Let's see one more example where we will print some more text on the console.
#include <stdio.h>
int main()
{
printf("\n\n\t\tStudytonight - Best place to learn\n\n\n");
int num;
printf("\nHello world!\nWelcome to Studytonight: Best place to learn\n");
printf("\n\n\t\t\tCoding is Fun !\n\n\n");
return 0;
}
Output:
![Hello World Program in C language]()
\n
is used to move the control onto the next line
\t
is used to give a horizontal tab i.e. continuous five spaces