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

Explain all the C++ concepts using examples.

788


What are manipulators used for?

710


Explain shallow copy?

687


What is difference between class and function?

671


What do you mean by translation unit in c++?

798






Is c++ low level?

695


What is searching? Explain linear and binary search.

668


What are the advantages of using a pointer?

693


Is c++ vector a linked list?

647


What is the best way to take screenshots of a window with c++ in windows?

668


Describe the setting up of my member functions to avoid overriding by the derived class?

700


What is the difference between the parameter to a template and the parameter to a function?

749


What are the c++ access specifiers?

917


What's the most powerful programming language?

680


What are c++ data types?

734