creating the object means creating the memory therefore even though there are no members in the class also it will create a phsical memory location of 1 byte and gets the address(object is reality)
Yes the compiler will generate 1 byte of memory to mark the existence of the class. This doesn't answer WHY though. The reason is the language standard states that all classes must have a memory size of at least 1 byte so that the class doesn't occupy the same memory space with another class. This is to prevent name mangling. i.e. if I declare a class A {}; the compiler will still generate an entry in its table to something called "A". If behind that I declare another class say class B if A takes 0 bytes of memory and B's data gets written in the place where A was declared. In this case an instantiation of A would take on the properties of B.