why the size of an empty class is 1

Answer Posted / surender a

Because the fundamental size is a char [viz 1 byte by
default on any 32 bit or 64 bit machine].

Is This Answer Correct ?    5 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention the ways in which parameterized can be invoked. Give an example of each.

574


Can you overload the operator+ for short integers?

599


What is the difference between structure and class?

562


Explain the use of this pointer?

637


What is #include math h in c++?

572






What are abstract data types in c++?

535


Difference between a copy constructor and an assignment operator.

576


What does new return if there is insufficient memory to make your new object?

588


Explain the problem with overriding functions

609


What are static variables?

619


What is ios class in c++?

581


What is auto used for in c++?

569


What is static class data?

577


What is lambda in c++?

580


Why do we need c++?

594