Random zero appears in display!

You are incorrect, it works perfectly. You did not use it correctly. This is the only thing I can assume, since you did not post your code where you attempted to use sprintf().