-
What is the Size of an Empty Class
What is the logic behind size of an empty class = 1? (As per C++)Ex:class base {};main(){printf("Size of the Empty Class is: %dn", sizeof(base));}It gives output: Size of the Empty Class is: 1I have not got the reason / logic behind this.Can anyone help me?
-
Static Constant Function
Consider a static const function y() that is private member function of a class Y. What do the static and const mean? When could this function be used?
-
Copy Constructor
Explain what is copy constructor and what is the difference between copy constructor and overloaded assignment operator
-
Classes
The copy constructor of class Money is called in which of the following cases?Choose one answer. a. Money amount1;Money amount2(amount 1); b. void func(Money amount);[...]Money amount1;[...]func(amount1); c. Money func();[...]Money amount1 = func(); d. all of the above