why the size of an empty class is 1

Answer Posted / abhishek

its because an empty class makes an entry to symbol table (code segment)
which requires a symoblic mapping of 1 byte

Is This Answer Correct ?    9 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What new()is different from malloc()?

569


Explain linear search.

634


What is abstraction with real time example?

621


Write about an iterator class?

612


Can we specify variable field width in a scanf() format string? If possible how?

664






How do you compile the source code with your compiler?

618


Explain how a pointer to function can be declared in C++?

582


What is the difference between an array and a list?

586


What are the uses of pointers?

581


Explain the differences between private, public and protected and give examples.

567


Describe the advantages of operator overloading?

577


Explain container class.

688


What is while loops?

617


What is a sequence in c++?

582


Can I learn c++ without c?

603