What is size of a empty class?
Answer Posted / ganesh
when ever an datamember is not the part of the class then default value for object size is 1 byte.
but if int a;
char c;
then it will consume 3 bytes .........
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Where are setjmp and longjmp used in c++?
Is c++ still in demand?
When do you call copy constructors?
Can static member variables be private?
How to implement is-a and has-a class relationships?
What is a constructor in c++ with example?
Do class method definitions?
What kind of problems can be solved by a namespace?
Write about the role of c++ in the tradeoff of safety vs. Usability?
What is the history of c++?
Who discovered c++?
What is array in c++ example?
What are single and multiple inheritances in c++?
Which c++ operator cannot overload?
What is namespace std; and what is consists of?