Hello World Program

Components of a ‘C’ Program:

The main() Function

The only component that is required in every C program is the main() function. Under normal circumstances, program execution starts at the first statement in main() and terminates at the last statement in main().

The #include Directive

The #include directive instructs the C compiler to add the contents of an include file into your program during compilation. An include file is a separate disk file that contains information needed by your program or the compiler. These files are called header files and are supplied with your compiler. (For example, STDIO.H).


The printf() statement is a library function that displays information on-screen


The return statement returns a value of 0 to the operating system just before the program ends.


Mr. Sandeep Soni

Founder, Trainer & CEO, Deccansoft Software Services.

Sandeep has 21 yrs of experience working in various Microsoft Technologies/Platforms incl. VB6.0, ASP, VC++, VB.NET, C#. He is involved in managing and architecting projects at Deccansoft. He will be your liaison to Deccansoft, for any kind of communication and project updates. He knows what works and what doesn’t, and what practices are most suitable for design and programming with the ultimate goal of producing a quality system.