This is a Simple C Program which prints "Hello Word!"...
//Write a Simple C Program Which prints Hello World.
#include<stdio.h>
#include<conio.h>
void main()
{
printf("Hello World");
getch();
}
This program uses printf
function to print Message.
Header file is a collection of built-in functions that help us in our program. Header files contain definitions of functions and variables which can be incorporated into any C program by pre-processor #include statement. Standard header files are provided with each compiler, and cover a range of areas like string handling, mathematical functions, data conversion, printing and reading of variables. To use any of the standard functions, the appropriate header file must be included. This is done at the beginning of the C source file. For example, to use the printf()
function in a program, the line #include <stdio.h> is responsible.
main()
function is a function that must be used in every C program.
A function is a sequence of statement required to perform a specific task.
main()
function starts the execution of C program.
In the above example, int in front of main() function is the return type of main() function. we will discuss about it in detail later.
The curly braces { }
just after the main()
function encloses the body of main()
function.
Variable will explain in later in next tutorial.
expression also will explain later...
Comments are simple text in your C program that increases readability of programs. Compiler ignore anything written as comment in your program.
//This is valid Single line Comment
/*This is also valid Single line Comment*/
/*-------------------------------------------
This is a long and valid Multi line Comment
--------------------------------------------*/
This is really easy and helpful to all the students for learning C Language. Thank you for getting this to us.
Very clean and beautiful site with lowests load.... beautiful design
create a program for hello world without using any header files & any loops
Ask Question