Previous | Home | Next |
C Instruction
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.
Example
int bas ; float rs, gross Sal ; char name, code;
Arithmetic instruction
To perform arithmetic operation between constants and variables.
Example
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.
Control instruction
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
Previous | Home | Next |