Answer Posted / amit basak
The size of the class will be 1 byte as mentioned by Rahul...
Here is the below code in Cygwin ...
// This program is to find the size of empty class
#include<iostream>
using namespace std;
class Demo
{
};
int main ()
{
cout <<"Sizeof Demo class is ="<<sizeof(Demo)<<endl;
return(0);
}
And here is the output..
$ ./a.exe
Sizeof Demo class is =1
Is This Answer Correct ? | 14 Yes | 1 No |
Post New Answer View All Answers
Explain the differences between list x; & list x();.
What is an iterator class in c++?
How one would use switch in a program?
What is heap sort in c++?
How can I learn dev c++ programming?
What are the various storage classes in C++?
List the issue that the auto_ptr object handles?
How can you create a virtual copy constructor?
What is meant by entry controlled loop? What all C++ loops are exit controlled?
What is the v-ptr?
How much do coding jobs pay?
What are vectors used for in c++?
what is multi-threading in C++?
Which is the best c++ compiler?
Distinguish between new and malloc and delete and free().