Question: why size of empty class is 1?
Answer: Why size of empty class is 1 byte in C++? To an object of an empty class, 1 byte is allocated by compiler for unique address identification. ... That's the reason when we create an object of an empty class in C++ program, it needs some memory to get stored, and the minimum amount of memory that can be reserved is 1 byte.