You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The assignment operators in C can both transform and assign values in a single operation. C provides the following assignment operators:
21
22
22
23
|Operator|Operation Performed|
23
24
|--------------|-------------------------|
24
-
|**=**|Simple assignment|
25
-
|***=**|Multiplication assignment|
26
-
|**/=**|Division assignment|
27
-
|**%=**|Remainder assignment|
28
-
|**+=**|Addition assignment|
29
-
|**-=**|Subtraction assignment|
30
-
|**<\<=**|Left-shift assignment|
31
-
|**>>=**|Right-shift assignment|
32
-
|**&=**|Bitwise-AND assignment|
33
-
|**^=**|Bitwise-exclusive-OR assignment|
34
-
|**|=**|Bitwise-inclusive-OR assignment|
25
+
|**`=`**|Simple assignment|
26
+
|**`*=`**|Multiplication assignment|
27
+
|**`/=`**|Division assignment|
28
+
|**`%=`**|Remainder assignment|
29
+
|**`+=`**|Addition assignment|
30
+
|**`-=`**|Subtraction assignment|
31
+
|**`<<=`**|Left-shift assignment|
32
+
|**`>>=`**|Right-shift assignment|
33
+
|**`&=`**|Bitwise-AND assignment|
34
+
|**`^=`**|Bitwise-exclusive-OR assignment|
35
+
|**`|=`**|Bitwise-inclusive-OR assignment|
35
36
36
37
In assignment, the type of the right-hand value is converted to the type of the left-hand value, and the value is stored in the left operand after the assignment has taken place. The left operand must not be an array, a function, or a constant. The specific conversion path, which depends on the two types, is outlined in detail in [Type Conversions](../c-language/type-conversions-c.md).
0 commit comments