I think title is self-explanatory, but for better format.
Is sizeof(unsigned char)
also guaranteed to be 1?
I don't believe this question to be a duplicate because:
- C is different from C++ (tag excerpt:
...It was originally designed as an extension to C, and keeps a similar syntax, but is now a completely different language...
). char
can be either signed or unsigned. There's no reason to assume thatsizeof(unsigned char)
==sizeof(char)
unless you get assured by the standard, hence the question.- Even if you confuse C with C++, answers do not overlap.