There are basically 3 types of instruction in c:
- Type declaration instruction
- Arithmetic instruction
- Control instruction
Type declaration instruction
To declare the type of variables used in c program.
int bas ; float rs, gross Sal ; char name, code;
To perform arithmetic operation between constants and variables.
int ad ; float kot, deta, alpha, beta, gamma ; ad = 3200 ; kot = 0.0056 ; deta = alpha * beta / gamma + 3.2 * 2 / 5 ; Here, *, /, -, + are the arithmetic operators. = is the assignment operator. 2, 5 and 3200 are integer constants. 3.2 and 0.0056 are real constants. ad is an integer variable. kot, deta, alpha, beta, gamma are real variables.
To control the sequence of execution of various statements in c program.
- Sequence Control Instruction
- Selection or Decision Control Instruction
- Repetition or Loop Control Instruction
- Case Control Instruction