What is size of empty class object

Answer Posted / vinay singh

the size of class is nothing until it will not create an object. Class is a template so class object size is determined.So here empty class object size is 1 byte and object is created on managed heap.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the manipulators in c++?

794


What is an inline function in c++?

864


What operators can you overload in c++?

789


What are inline functions? What is the syntax for defining an inline function?

824


What is the difference between struct and class?

1064


What is recursion?

1243


What is virtual destructor ans explain its use?

844


What is the best c++ compiler for windows 10?

777


What is switch case in c++ syntax?

848


Explain data encapsulation?

879


What is a block in c++?

794


In c++, what is the difference between method overloading and method overriding?

823


How do you define a class in c++?

832


Why do we use the using declaration?

922


Why we use #include conio h in c++?

798