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
What is the benefit of learning c++?
What is meaning of in c++?
Which is better c++ or java?
Explain the difference between c & c++?
Is java made in c++?
How do you add an element to a set in c++?
Explain the differences between list x; & list x();.
daily Routine of father
Can a program run without main in c++?
How is modularity introduced in C++?
Which is better turbo c++ or dev c++?
List different attributes in C++?
Refer to a name of class or function that is defined within a namespace?
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).
How to declare a function pointer?