I am stuck on figuring out what form the bytes are in when they're read? I created a buffer of type char and I get one result when I read the bytes in. Then I created a buffer of type int and I get a different result when reading over those same bytes.

I am looking for a data type to store the bytes as hexadecimal.

  • If my answer helped, please accept it by clicking the check mark under the vote buttons.
    – i_am_david
    Jul 30, 2015 at 4:14

1 Answer 1


Unsigned char works, so does uint8_t.

  • may i ask why int does not work? all these variable types store integers. and int has larger range of value than uint_8t or unsigned char. so int has these numbers in its range too. i'm a little bit confused. Oct 1, 2017 at 22:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .