How do I print a hexadecimal number with leading 0 to have width 2 using sprintf? December 11, 2023 by Tarik