Monday, 24 December 2012

Types Of Instructions in C


Types Of Instructions in C :

                      Basically three types of instructions in C:

Type Declaration Instruction  --To declare the type of variables used in a C program.

Arithmetic instruction             -- To perform arithmetic operations between con-stants and variables.

Control Instruction           --      To control the sequence of execution of various state-ments in a C program. 



Type Declaration Instruction :                  Arithmetic Instruction :    


          EX:          int bas ;                                         EX: int i=i+1;
                         float rs, grosssal ;
                         char name, code ;

Control Instructions in C program :

                          4 Types:
 They are:

(a) Sequence Control Instruction  --->Example of line by line execution without Interruption
(b) Selection or Decision Control Instruction- if,if-else,switch-case
(c) Repetition or Loop Control Instruction. -->while,do-while and for 





No comments:

Post a Comment