Your code fails to distinguish between 1-1 and 1-0. Both result in a non-negative c but you append a '0' to result when the latter case requires a '1' be prepended.
Furthermore, you prepend '1' but append '0'. New characters should always be added on the same end of result. Since you are processing characters from right to left, you should prepend '0' the same way you do '1'.
If both values have the same length, you don't need to test i and j. Either one is sufficient. If not, you may need to extend the shorter one.
It would be much easier to to compute the twos-complement of the subtrahend (secondNumber) and then perform addition. Carries are easier to deal with than borrows.
If you need to do actual subtraction, then you need a borrow flag that starts as false.. Each time you extract a, test the flag. When true, reset it to false and decrement a (yes, it may go negative). if c<0, c+=2 and set the flag to true. In all cases, add the character (c+'0') to result.