what is the size of an empty class

Answers were Sorted based on User's Feedback



what is the size of an empty class..

Answer / hardit singh

size of an empty class is 1 byte

Is This Answer Correct ?    32 Yes 3 No

what is the size of an empty class..

Answer / muniskehar

size of an empty class is 1Byte

Is This Answer Correct ?    7 Yes 1 No

what is the size of an empty class..

Answer / manu

1 byte it 100% correct ans dont get confuse

Is This Answer Correct ?    5 Yes 2 No

what is the size of an empty class..

Answer / som shekhar

1 byte.

Reason being when compiler sees an empty class then then it
assigns a 1 byte memory, since the compiler sees the
declaration of the class so he needs to assign some space in
the memory, and hence assign 1 byte memory to hold the
address of the class.

Is This Answer Correct ?    4 Yes 1 No

what is the size of an empty class..

Answer / asdf

According to the standard C++03, all classes "shall have
nonzero size."

1 byte is the most common implementation but it is left up
to the vendor.

Is This Answer Correct ?    2 Yes 0 No

what is the size of an empty class..

Answer / padma

Size of an empty class is 0.

Is This Answer Correct ?    0 Yes 0 No

what is the size of an empty class..

Answer / ankit sharma

size of empty class is 1 byte.


if object does not point to any resource.
it shows object is null but object also get some space in
memory by default either it is empty or not.

Is This Answer Correct ?    0 Yes 0 No

what is the size of an empty class..

Answer / ansari razi

1 Byte,
when compiling the program compiler allocates 1 byte memory.

Is This Answer Correct ?    0 Yes 0 No

what is the size of an empty class..

Answer / kaush

1 byte for empty class before assigning the value

Is This Answer Correct ?    0 Yes 1 No

what is the size of an empty class..

Answer / p.madhupriya

1 byte or 0

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More OOPS Interview Questions

what is the difference between inter class and abstract class...?

0 Answers  


What are the features of oop?

0 Answers  


Why is polymorphism important in oop?

0 Answers  


i ahve v low % in 12th n BSC which is aroun 50 coz science was imposed on me......nw m doin MCA n my aggregate in above 74%,what shud i say if asked about low previous percentage??????

4 Answers  


Which is not an object oriented programming language?

0 Answers  






write a c++ code to overload + and - for a stack class such that + provides push and - provides pop operation

1 Answers   College School Exams Tests, HCL, IBM, TCS,


Plese get me a perfect C++ program for railway/airway reservation with all details.

0 Answers   ITM,


What is polymorphism what is it for and how is it used?

0 Answers  


What does <> mean pseudocode?

0 Answers  


for example A,B,C,D are class all the 4 class contain one method who() but the method who() implementaion is differnet among each class. the relation among the 4 class are A is base class and is inherited by B and C.and from this two B and C where D is inherited. the question is i want to display the output who() method in all the classes(A,B,C,D)the output of who() method is diferrent amond all the class(A,B,C,D) ------A------ virtuval who(print a) override | | who(print b) B C override who(print c) | | -------D------ override who(print d)

2 Answers  


How to deploy web appliction in web logic ?

1 Answers   Unisys,


I hv a same function name,arguments in both base class and dervied class, but the return type is different. Can we call this as a function overloading? Explain?

3 Answers  


Categories