answersLogoWhite

0


Best Answer

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...

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why is the Size of an empty class 1 byte?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the size of an empty class?

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.


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).


Bits and bytes according to size?

8 Bits = 1 Byte Also, 4 Bits = 1 Nibble = Half Byte


What is bit size?

A bit size is one. It can be either a 0 or 1. Eight bits together is called a byte. Four bits (half of a byte) is called a nibble.


What is the largest positive integer that can be stored in memory size of 1 byte?

255


What size of space in a computer is used to hold a character?

1 byte (Unicode)


What is the size comparison between a byte and a megabyte?

1 MB = 1x10^6 B


Is terabyte the largest unit of storage?

No. There is no limitation on size. A Googalplex of byte storage is 1 byte with a hundred zeros after it, and this is thought to be a minimalistic quantity in futuristic technology. Who knows, if any, what the limitations will be.


How big is a pectrol byte?

1024 amos byte = 1 pectrol byte


What do you call 1 part of a byte?

1 byte = 8 bits


1 byte is 18 bits?

1 Byte is 8 bits


Does a sentence requires 1 byte of storage?

No, 1 byte is equal to 1 character