-->

Wednesday, July 3, 2019

Program Structure of C programming





Program structure

Before we study basic program structure of C programming language
We take a c program which is helping to understand easily.

C  Hello World Example


  1. .        It contains basically following parts  :
  2. .      Pre-processor command/pre-processor directives
  3. .      Functions
  4. .      Variables
  5.       Expressions /Statements
  6. .     Comments


#include<stdio.h>#include<conio.h> Int main(){//my first programprintf(“Hello World”)return 0;}


o   In first line or the program #include
<stdio.h>
Is a pre-processor directives
(pre-processor is starting with “#” symbol)
(stdio.h=this is header file )

o   Int main() is main function where program execution begin

o   // or /*     */ (comments)
Which is ignored by compiler

o   Printf() is another function ,which causes the message
“Hello World “ on the screen.
o   The next line return 0; terminates main()
Function and return the value 0





       < previous page                                                                             Next page >

0 Comments:

Post a Comment