I have a C++ question. I wrote the following class:
class c
{
int f(int x, int y){ return x; }
};
the sizeof() of class c returns \"1\"
sizeof(char)==1 always, because a char is a byte and sizeof returns a number of bytes. (However, a byte is not necessarily exactly eight bits.)
Absolutely true. Hence the term "octet" (to distinguish something that is exactly 8 bits from the more commonly used term "byte").
For more info, look at IEEE 1541:
http://en.wikipedia.org/wiki/IEEE_1541