C Programming language

adplus-dvertising
C Instruction
Previous Home Next

C Instruction

There are basically 3 types of instruction in c:

  1. Type declaration instruction
  2. Arithmetic instruction
  3. 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.

  1. Sequence Control Instruction
  2. Selection or Decision Control Instruction
  3. Repetition or Loop Control Instruction
  4. Case Control Instruction
Previous Home Next