Structure Of C Program

Here we will look it into basic structure of C program.Before going to deep programming  we should understand the basic aspect of c program.In Almost any programming  Language the basic program is Hello world Program, so lets start with hello world program.

Hello World program Example:

#include< stdio.h>

int main()


//This Will Display Hello World on o/p screen

 printf("Hello World");

return 0;


The program in C is mostly Consist of Following Parts:

  • Declaration Of Preprocessor Directive

  • Declaration of Fuctions

  • Expression Or Syntax

  • Comments

  • return value to the fuction

Let Us Look Each element of program in deep:

  • Here the first line is #include<stdio.h> which tells the compiler to add standard input output files from standard library before the compilation of the program.

  • here the second part is int main() where main is fuction of return type 'Integer'.The Actual Extecution of Program Starts from main() . There is only one main() in any program.

  • Next part is of comment.Comment is the only part of the program which cannot compiled. Comments may be of two types a)Single line b)Multiline comment. In Above example the comment used is single line comment.
  • return 0 - This line returns no value(0) to the main function.

Compilation And Running of program :-
  1. On Windows by using Turbo C :-

  2. 1.To create new files goto File > new.

    2.Type Above program in it and save it as .c extesion from file tag or by pressing f2.

    3.Click on compile on title bar or press Alt+f9

    4.Click On run to run program.

  3. By Using Gcc On Other Platforms:- 1.Type above code in any text editor and save as filename.c

    Write A Comment


Nullamlacus dui ipsum conseque loborttis

Urnaultrices quis curabitur phasellentesque congue magnis vestibulum quismodo nulla et feugiat. Adipisciniapellentum leo ut consequam ris felit elit id nibh sociis malesuada.

Continue Reading »

Nullamlacus dui ipsum conseque loborttis non euisque morbi penas dapibulum orna.

Continue Reading »

Lorem ipsum dolor

Nuncsed sed conseque a at quismodo tris mauristibus sed habiturpiscinia sed.

Nuncsed sed conseque a at quismodo tris mauristibus sed habiturpiscinia sed. Condimentumsantincidunt dui mattis magna intesque purus orci augue lor nibh.

Continue Reading »