2. Pre-processor statements
Global variable declaration section
Void main()
{
Local variable declaration section
<statements>
}
Void sub-function()
{
Local variable declaration section
<statements>
}
3. ⦁ These are the statements which can be executed
before the program starts execution.
⦁ This can be executed in the compile time.
⦁ Compile time=compilation+linking.
⦁ Example:
#define
#undefine
#include
#if
#end if
#else
⦁ This is the 1st part of c code.
4. ⦁ C language is a set of small small functions.
⦁ Let us take 3 functions in a c code.
⦁ The first function stores an integer value i.e
a=10.
⦁ So it can’t be used in remaining functions
then it is called local variable.we define them
at local variable declaration section.
⦁ But if we want to use a value througout all the
program then it should be declared at global
variable declaration section and is called
global variable
5. ⦁ It is the main function of a c code
⦁ Every c program consists of only one main
function.
⦁ C program is a collection of many functions.
⦁ The first function we define is main function
and remaining all are sub functions.
⦁ This is the 3rd part of a c code.
6. ⦁ To open any function we specify {.
⦁ That means the function gets opened.
⦁ To close any function we write}.
⦁ This closes the function.
7. ⦁ We can write the statements in c in this
statements block.
8. ⦁ The c code consists of many number of sub
functions if we need.
⦁ Soo we start the function ,we open,we declare
local variables ,we state and we close the
subfunction.