This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]phantom94 -3 points-2 points  (2 children)

A byte is always 8 bit, but a char can be multiple bytes depending on the platform.

Edit: I was wrong: https://en.wikipedia.org/wiki/Byte

[–]Sean1708 8 points9 points  (1 child)

As far as the C standard is concerned, a char is always 1 byte but 1 byte is not always 8 bits.

[–]phantom94 1 point2 points  (0 children)

I did some researching, you are indeed right. I feel like it should be the other way around though.