| <<< Arithmetic If | Index | Increment and Decrement Operators >>> |
Assign values to variables:
int main()
{
int x;
int y;
int z;
x = 1;
y = x;
x += y; // x = x + y;
z *= 3; // z = z * 3;
return 0;
}
The last two operators,
+= and *=
are known as arithmetic assignment operators. They are pronounced as "add and assign," "multiply and assign ," respectively.
| <<< Arithmetic If | Index | Increment and Decrement Operators >>> |