What is the size of class

Answers were Sorted based on User's Feedback



What is the size of class..

Answer / sagar

there is no size for class . class is a blue print it s not hold any memory but object can hold the memory .................

Is This Answer Correct ?    0 Yes 1 No

What is the size of class..

Answer / nagesh

To find the size of class ...find size of the object of that
class.

It will be 1.

Is This Answer Correct ?    1 Yes 3 No

What is the size of class..

Answer / ashok

one byte

Is This Answer Correct ?    4 Yes 7 No

What is the size of class..

Answer / ram

size of empty class object will be one byte.
When the class is with member variables and virtual member
fuction the size of the object will be depends on padding.
ex:
class Trial
{
public:
virtual void func() {};
char c;
};
printf("SizeofTrial: %d\n", sizeof(Trial));
SizeofTrial: 8

Is This Answer Correct ?    4 Yes 8 No

What is the size of class..

Answer / ajay senwal

Class size is one factor to consider when evaluating a
school’s effectiveness. But small class size alone does not
ensure a good education. The quality of the teaching, the
school leadership, the size of the school, the amount of
parent involvement and other factors are important to
consider, too

Is This Answer Correct ?    1 Yes 10 No

What is the size of class..

Answer / maneesh

Size of class is size of member variables plus virtual
functions used in class. For each virtual function it takes
2 byte for setting the Vptr table.

Is This Answer Correct ?    2 Yes 13 No

What is the size of class..

Answer / ok

unlimited

Is This Answer Correct ?    2 Yes 31 No

What is the size of class..

Answer / sivaraman

class has no size.

Is This Answer Correct ?    4 Yes 58 No

Post New Answer

More MFC Interview Questions

1)How to create ToolTip in MFC?

2 Answers  


What function is used to disable a control at runtime?

7 Answers  


Tell me the different controls in MFC ?

5 Answers  


What are the advantages of using Doc/View or SDI over DialogBox

2 Answers  


What is the use of UpdateData funciton ?

7 Answers  






What is stack size in win32 program?

1 Answers   HCL,


What is the base class for MFC Framework ?

2 Answers   Mphasis,


Explain the flow of SDI application?

8 Answers   Mphasis,


What MFC base classes provide support for ActiveX controls?

2 Answers   Wipro,


What is thread & process?

15 Answers   Exaband,


How we can findout Memoryleaks, In what way it can be avoided

6 Answers   Infosys,


In MFC By Using Communication Between Dialog Boxes,How Can We Send Message Of one Dialog Box To Another Dialog.?

3 Answers   Financial Technologies,


Categories