SyntaxFix
Write A Post
Hire A Developer
Questions
Use the %02X format parameter:
%02X
printf("%02X",word[i]);
More info can be found here: http://www.cplusplus.com/reference/cstdio/printf/