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 advantages of pointers?

683


Please explain the reference variable in c++?

703


What is an arraylist c++?

796


Why would you use pointers in c++?

716


What does #define mean in c++?

762






Where and why do I have to put the "template" and "typename" keywords?

676


What is recursion?

744


What are the extraction and insertion operators in c++?

663


Explain the concept of dynamic allocation of memory?

697


When do we run a shell in the unix system? How will you tell which shell you are running?

638


What are keywords in c++?

739


What do you mean by stack unwinding in c++?

826


What is the meaning of string in c++?

662


What does I ++ mean in c++?

662


How can you prevent accessing of the private parts of my class by other programmers (violating encapsulation)?

738