iconNotes in Public

C Assignment Operators

Mar 27, 20231 min read


An assignment operator is used for assigning a value to a variable. The most common assignment operator is =

Example

int x = 10;

A list of all assignment operators:

OperatorExampleSame AsTry it
=x = 5x = 5Try it »
+=x += 3x = x + 3Try it »
-=x -= 3x = x - 3Try it »
*=x *= 3x = x * 3Try it »
/=x /= 3x = x / 3Try it »
%=x %= 3x = x % 3Try it »
&=x &= 3x = x & 3Try it »
|=x |= 3x = x | 3Try it »
^=x ^= 3x = x ^ 3Try it »
>>=x >>= 3x = x >> 3Try it »
<⇐x <⇐ 3x = x << 3Try it »

Graph View

Backlinks

  • C MOC
  • C Numbers

Created with Quartz v4.5.1 © 2025, Icon Designed by Freepik.

  • GitHub
  • Source Code
  • Report Error