What is size of empty class object

Answer Posted / manish shikarbar

answer is :1

Example:

class Test
{
};

Test Obj;

int size = sizeof(Obj); // answer is 1

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by overhead in c++?

811


What does h mean in maths?

855


How a new operator differs from the operator new?

880


What does int * mean in c++?

965


What is c++ stringstream?

877


How do you save a c++ program?

787


What do you mean by const correctness?

838


What are the benefits of c++?

798


Define a constructor - what it is and how it might be called (2 methods)?

822


Which ide is best for c++?

772


What can I safely assume about the initial values of variables which are not explicitly initialized?

828


What is the use of pointer in c++ with example?

797


Is c++ used anymore?

843


Is oops and c++ same?

794


What are register variables?

846