What is size of a empty class?

Answer Posted / mashal

Size of an empty class is 1 byte. It is non zero to ensure that the two different objects will have different addresses.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by entry controlled loop?

656


What is a terminating character in c++?

760


Difference between Abstraction and encapsulation in C++?

575


What is the use of lambda in c++?

571


Mention the ways in which parameterized can be invoked.

534






Explain terminate() function?

589


Can we use this pointer inside static member function?

623


Write a program to encrypt the data in a way that inputs a four digit number and replace each digit by (the sum of that digit plus 7) modulus 10. Then sweep the first digit with the third, second digit with the fourth and print the encrypted number.

2088


Which is best ide for c++?

565


Write a function to find the nth item from the end of a linked list in a single pass.

565


Explain the benefits of proper inheritance.

636


Explain operator overloading.

598


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create

2067


What is the advantage of c++ over c?

556


Will rust take over c++?

589