Edited:
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.
unsigned char num[32]; // The size could be any number for this question.
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.
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
I do not want to use other library. How can I do it?