What is size of Empty Class?

Answer Posted / saket kale

when i tried to calculate the size of an empty class that
time i found that it takes 1 byte.which is the size of a
char.That might be the memory taken by the compiler for
storing the address of a empty class.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you create a virtual copy constructor?

578


What is the use of endl?

541


Is c++ a good first language to learn?

571


Which software is best for c++ programming?

571


How to declaring variables in c++?

653






Is it possible to pass an object of the same class in place of object reference to the copy constructor?

566


Explain the use of this pointer?

634


Why namespace is used in c++?

598


What is insertion sorting?

659


What is c++ array?

546


What is &x in c++?

556


What do you mean by funtion prototype?

578


Who created c++?

570


How do you clear a set in c++?

598


What are libraries in c++?

601