int to char question

Do I understand sprintf correctly?

Hard to say without seeing how you defined c.