DO NOT MISS

Ads

Saturday 18 June 2016

Assignment operators in C-Language


Operators used to assign the result of expression to a variable. The usual assignment operator is ‘=’ symbol. In addition ‘C’ has a set of shorthand assignment operators of the form. 
Variable operator = value.
Example:-

Assignment Operator
Short hand operator
a = a+1
a+ =1
a = a-1
   a-  =1
a = a*5
a* =5
a = a/6
a/ =6
   a = a%10
a% 10

Here +=, -=, *=, /=, %= operators are called compound assignments operators.


Greataims

 
Copyright © 2016 Computersadda. Designed by @ Computersadda Team - Published By Greataims