Compound Assignment Operator is the combination of arithmetic operator and assignment operator.The possible compound assignment operator are as follow-:
(a-) + =
=> a+=b; this statement equals to a=a+b.
(b-) - =
=> a-=b; this statement equals to a=a-b.
=> a-=b; this statement equals to a=a-b.
(c-) * =
=> a*=b; this statement equals to a=a*b.
=> a*=b; this statement equals to a=a*b.
(d-) / =
=> a/=b; this statement equals to a=a/b.
=> a/=b; this statement equals to a=a/b.
(e-) % =
=> a%=b; this statement equals to a=a%b.
=> a%=b; this statement equals to a=a%b.
Example-:
7+=2 => 7+2=9
8-=4 => 8-4=4
3*=2 => 3*2=6
5/=2 => 5/2=2
16%=3 => 16%3=1
ads
ads
follow techprogramiz...to get more blogs on C language
ReplyDelete