Professional Documents
Culture Documents
}
Variable declaration
syntax;
Data type variable name ;
S1;
S1 S2
}
else {
S2; S3
}
S3;
Boolean conditions
• Comparison operators
== equal
!= not equal
< less than
> greater than
<= less than or equal
>= greater than or equal
• Boolean operators
&& and
|| or
! not
Examples
Assume we declared the following variables:
int a = 2, b=5, c=10;
1.Function declaration
2. function definition
3. function calling
1.Function declaration
Syntax:-
Example:-
Example:-
void delay (unsigned int x)
{
for(i=0;i<x;i++);
}
NOTE:- Always use after function declaration.
No need to declare function if definition is before main.
1.Function calling
Syntax:-
Example:-
delay (2000);