Answer Posted / orvaishnavi
The size of an empty class is 1.
Reason - An object of a class should have unique address.
In order for the object to get unique address, the compiler
inserts a dummy type of size 1(least positive value) into
the empty class so the sizeof the class is returned as 1.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
How does the copy constructor differ from the assignment operator (=)?
Do vectors start at 0 c++?
What is c++ array?
Explain about vectors in c ++?
A mXn matrix is given and rows and column are sorted as shown below.Write a function that search a desired entered no in the matrix .with minimum complexity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Which coding certification is best?
What is flag in computer?
What is ostream in c++?
Write a program which uses Command Line Arguments
What is vector pair in c++?
What is the full form of c++?
Explain the difference between abstract class and interface in c++?
Write about the role of c++ in the tradeoff of safety vs. Usability?
Explain the use of vtable.
What is a forward referencing and when should it be used?