why the size of an empty class is 1

Answer Posted / kamna

it is becuse each oject must have a different address.

Is This Answer Correct ?    10 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is operators in c++?

561


What are pointers, when declared, intialized to a) NULL b) Newly allocated memory c) Nothing. Its random

647


What is the difference between structure and class?

548


What is difference between class and function?

583


Explain the advantages of using friend classes.

573






Can we use this pointer inside static member function?

621


Is there structure in c++?

585


What does extern mean in a function declaration in c++?

697


What is the benefit of encapsulation?

589


What do you mean by persistent and non persistent objects?

730


What are c++ data types?

636


Do inline functions improve performance?

639


What are compilers in c++?

601


Why do we need constructors in c++?

610


Which software is best for programming?

652