C Instructions:
There are basically three types of instruction in C.
1) Type declaration instruction.
2) Arithmetic instruction.
3) Control instruction.
1) Type declaration instruction:
This instruction is used to declare the types of variables being used in the program. Any variable used in the program must be declared before using it in any statement. The type declaration statements is written at the beginning of the main () function.
For example:
int a;
float b;
char name ; etc.
2) Arithmetic instruction:
A C arithmetic instruction consist of a variable name on the left hand side of = and variable name and constant are on the right hand side of = the variables and constants appearing on the right hand side of = are
connected by arithmetic operator like +, -,*,/ and etc.
For example:
int a,b,c;
a=10
b=20+60
c=a+b
No comments:
Post a Comment