title: How to make sense of modulo in c
body: <p>i am not understanding this modulo in c languge.<br>
  For example: </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include&lt;math.h&gt;
  
  int main()
  {
      int my_input[] = {23, 22, 21, 20, 19, 18};
      int n, mod;
      int nbr_items = sizeof(my_input) / sizeof(my_input[0]);
  
      for (n = 0; n &lt; nbr_items; n++)
      {
          mod = my_input[n] % 4;
          printf("%d modulo %d --&gt; %d\n", my_input[n], 4, mod);
      }
  }
  </code></pre>
  
  <p>Gives:  </p>
  
  <pre><code>23 modulo 4 --&gt; 3
  22 modulo 4 --&gt; 2
  21 modulo 4 --&gt; 1
  20 modulo 4 --&gt; 0
  19 modulo 4 --&gt; 3
  18 modulo 4 --&gt; 2
  </code></pre>
  
  <p>I would have expected a number that i can make sense of.<br>
  Essentially i am trying to test if a number is divisible by 4.  </p>