 <p>For the addition, it could be like this</p> <pre><code>bool addBigInt( const BigInt n1, const BigInt n2, BigInt res ) { int i, sum, carry = 0; for(i=0; i&lt;MaxDigits; i++) { sum = n1[i] + n2[i] + carry; res[i] = sum % 10; carry = sum / 10; } return carry == 0; } </code></pre>