What should be the size of the array of answer

https://ide.codingblocks.com/s/151891 This code will not work for input of addition of 9999 and 999. How should I decide the size of the final array. If i take answer array size 2 units greater than the size of the largeer array and if the input is not big then it will result i a leading zero which is not desirable. How to decide the size of the array?

Use another approach convert the array element to A string and then add it and then initialise final array of string length…