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
Search for: what is pair in c++?
What is std :: endl?
Write a code/algo to find the frequency of each element in an array?
what is multi-threading in C++?
Where are setjmp and longjmp used in c++?
What is data abstraction? How is it different from data encapsulation?
How can I learn dev c++ programming?
the first character in the variable name must be an a) special symbol b) number c) alphabet
Distinguish between a # include and #define.
Is atoi safe?
Incase of a function declaration, what is extern means?
Can we use this pointer inside static member function?
Is there finally in c++?
How should a contructor handle a failure?
Const char *p , char const *p What is the difference between the above two?