title: How to apply modulo operation on a char array in C?
body: <p>Edited:</p>
  
  <p>I have a big number that C does not have a type for it natively. I have to use a char array to hold it. As an example, I create a 32-byte array. It represents a large number up to 2 ^ 256.</p>
  
  <pre><code>unsigned char num[32]; // The size could be any number for this question.
  </code></pre>
  
  <p>I want to apply modulo operation on it, for example, I want to mod the big number by a small divisor and get an integer type result.</p>
  
  <pre><code>int divisor = 1234; // Note that the divisor is much smaller than the big number
  int result;
  
  // do something here
  // to produce a result
  // like result = number mod divisor
  </code></pre>
  
  <p>I do not want to use other library. How can I do it?</p>