What is size of a empty class?

Answer Posted / mashal

Size of an empty class is 1 byte. It is non zero to ensure that the two different objects will have different addresses.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by entry controlled loop?

891


When to use “const” reference arguments in a function?

841


Is c++ platform dependent?

865


Are c and c++ different?

755


what are the events occur in intr activated on interrupt vector table

1435


Define basic type of variable used for a different condition in C++?

898


Will the following program execute?

815


What is polymorphism and its type in c++?

807


Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

1767


What is private, public and protected inheritance?

856


What is purpose of abstract class?

837


Where is atoi defined?

817


Search for: what is pair in c++?

908


What is ios flag in c++?

905


Can non graphic characters be used and processed in C++?

947