If you want to implement the 'C' program we have to know about its structure.
A structure is a nothing but a rule. It contains the following sections.
a) Documentation (or) Comment Section:-
b) Header file (or) Linking Section:-
Syntax :-
It consist the set of comment lines. The document section consists the set of comment lines giving the name of the program, author name and other details.
//---------------------------- ( Single line Comment)
/*----------------------- */ ( Multi line Comment)
It is used to provide a link between two files for solving particular problem.
It contains the following header or help files.
Syntax :-
#include<header file.h>
( # means -- pre processor )
( # means -- pre processor )
1. Stdio.h :-
It stands for Standard input output header file .
It stands for Standard input output header file .
It can perform all types input and output operations.
Because it is the common header file of every c program.
Ex:- printf(), scanf(), getchar(), putchar(), gets(), puts()
2. Conio.h :-
It stands for Console input output header file .
It is used to clear the output window screen .
Ex:- getch(),clrscr()
3. Math.h :-
It is used to perform all types mathematical operations.
Ex:- power values, square roots,logarithms,etc.
4. graphics.h :-
It is used to perform all types graphical oriented operations.
Ex:- To draw circles, rectangles, arc,etc.
5. Dos.h :-
It is used to generate the sounds and colorful outputs .
6. Stdlib.h :-
It stands for Stranded Library. Stranded Library is also supports to graphics & sounds in the format of sequential order.
7. Ctype.h :-
It Stands for character type . A character is a nothing but a letter.
If you want to perform single character operations we can use this header file only.
8. String.h :-
It is nothing but collection of characters.
If you want to perform collection of characters we can use this header file only.
Ex:- changing words , conversions and comparisons,etc.
c) Symbolic Section (or) Definition Section:-
It is used to fix the constant values to the specified variables.
Syntax :- # define pi=3.14
c) Symbolic Section (or) Definition Section:-
The definition section may be used define the symbolic
constants with an source program.
(or)
Syntax :- # define pi=3.14
d) Global declaration Section:-
This section is used declaration the global variables. The variables declared as global may active through out the program.
e) Main ( ) Section:-
Every C program must have one main function this section consists two parts namely local declaration section and statement parts.
The local declaration section declares all the variables used in statements. The statement part consist a sequence of executable instructions.
These two parts must appear between the opening and closing curly braces.
The program execution begins at the opening brace and end at the closing brace.
It is optional section it is also used for to implementing the programming.This section consists all the user defined function.
__________________________________________________________________________________
__________________________________________________________________________________
Post a Comment