I took some time to figure out the bug as i did'nt had the access to the debugger.
but overall it was a nice program that taught me the quick implementation of java big integer class in c++
and i also stored the number in arrays in reverse order so that i dont have to take of the 0 at the end of the numbers.