Let us understand arithmetic instruction:-
An instruction which is used to manipulate the data using operators is known as arithmetic instruction.
In C programming only one variable is allow before = symbol and after this there are no. of variable and constant can be used.
ex: a=b+c; //correct
a+b=c; //incorrect
note:-
a,b and c are data/operands and +,= is a operator
types of arithmetic instruction:-
1) integer mode:- an instruction in which all operand are of type int.
ex:- int a,b,c;
a=b+c;
2) real mode:- an instruction in which all are float(real) operand
ex:- float a,b,c;
a=b*c;
3) mixed mode:- an instruction in which some operand are of int type and some are of float type.
ex:- int a,b;
float c,d;
a=b*c-d;
Comments
Post a Comment