answersLogoWhite

0

1 byte. An empty class cannot be zero bytes otherwise it would be impossible to create an array of empty class objects, thus a dummy member is used to give it the minimum addressable size.

User Avatar

Wiki User

10y ago

What else can I help you with?

Continue Learning about Engineering
Related Questions

Why the size of class in oops is 1 byte without datamember?

The size of an empty class is not normally 1 byte, actually. It will usually be equal to the word size defined by the platform it is running on (often 2 or 4 bytes). This is because the word size is usually used as a memory address size and an empty class still needs to point to some location in memory (even if that location stores no data).


Why is the Size of an empty class 1 byte?

In order that unique objects have unique addresses, it is necessary for all objects to consume some memory. normally this is not a problem, unless the struct/class contains no data...


What freigh class do empty corrugated boxes ship?

class 55


What is an average class size?

The average class size is 35


What is size of an empty structure?

the same as when it is full


What is the size of an object of empty class?

That would depend on the programming language; even for the same language, it may vary for specific implementations. Usually such an object should just use a few bytes.


What is the weight of an empty trailer?

That depends on the size of the trailor.


How do you save electricity in your class?

Turn the lights off when the classroom is empty.


What are the opportunities for reducing the class size from 601 to 301?

advantages for reducing class size


What fills most of the size of the solar system?

Empty space.


Why use unequal class intervals in a frequency distribution?

they may be necessary in certain situations to avoid a large number of empty ,or almost empty, classes.


How much does one empty sack of rice weigh?

That would depend on the size of the sack and the material it is made ot of and how damp that material was. Also if the sack is empty it can not be "of rice" it is just and empty sack!