Interview Questions   Tutorials   Discussions   Programs   Videos   

C++ - Why the size of an empty class is 1?




255
views
asked marvit August 19, 2014 07:45 AM  

Why the size of an empty class is 1?


           

1 Answers



 
answered By bhjahnavi   0  
Size of an empty class is not zero. It is 1 byte generally. It is nonzero to ensure that the two different objects will have different addresses.
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert