C Instructions

There are basically three types of instructions in C:

  • Type Declaration Instruction
  • Arithmetic Instruction
  • Control Instruction

The purpose of each of these instructions is given below:

a) Type declaration instructionTo declare the type of
variables used in a C
b) Arithmetic instructionTo perform arithmetic
operations between constants and variables
c) Control instructionTo control the sequence of
execution of various statements in a C program
C Instructions

Type Declaration Instruction

This instruction is used to declare the type 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 statement is written at the beginning of main( ) function

Ex.: int bas ;
float rs, grosssal ;
char name, code ;

Arithmetic Instruction

A C arithmetic instruction consists of a variable name on the left hand side of = and variable names & constants on the right hand side of =. The variables and constants appearing on the right hand side of = are connected by arithmetic operators like +, -, *, and /.

Ex.: int ad ;
float kot, deta, alpha, beta, gamma ;
ad = 3200 ;
kot = 0.0056 ;
deta = alpha * beta / gamma + 3.2 * 2 / 5 ;

Leave a Comment