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
- . It contains basically following parts :
- . Pre-processor command/pre-processor directives
- . Functions
- . Variables
- Expressions /Statements
- . 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