I wounder why size of int depends on which OS one is using ,in C & C++. It\'s ok if size of pointer varies, but why size of integer. If 16 bit OS sizeof(int) = 2 byte, f
A byte is the smallest unit of memory which your target system can handle and uniquely address. As such, the size of a byte is platform and compiler-dependant, but in most settings is 8 bits.
So, assuming a byte is 8 bits, this would mean that 64 bits equals 8 bytes, 32 bits equals 4 bytes and 16 bits equals 2 bytes.
On a fuzzy level, an "X bit system" is a system where basic values (registers, ints, etc.) are X bits by default. Thus, how many bits your system natively uses immediately affects how many bytes are needed to hold those values.