Getting weird behavior in if statement.

jremington:
You definitely need more than 5 bytes (four characters plus zero terminator) in the digits array, as well as to keep in mind that array indexing begins with the 0th element.

I agree and I said in my response that I increased the array size, I was just saying that I think that it being of type char was proper.