Answer Posted / hitesh sojitra
When you calculate the size of a empty class that time you can c it takes 1 byte.which is the size of a char which a compiler takes for storing the address of a empty class.
The size of an empty class would depend on what is the range specified for the compiler for char. It takes that much space to store the address of a class.
Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
How do we balance an AVL Tree in C++?
Explain the static member function.
What is object in c++ wikipedia?
Is sorted c++?
Describe the process of creation and destruction of a derived class object?
Difference between declaration and definition of a variable.
Define a constructor - what it is and how it might be called (2 methods)?
How can you quickly find the number of elements stored in a static array?
Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.
Why do we need runtime polymorphism in c++?
What is a base class?
What are the advantages of using const reference arguments in a function?
What are the advantages of using a pointer?
Why was c++ created?
What is the best it certification?