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 difference between using macro and inline functions?
What is binary search in c++?
what are the iterator and generic algorithms.
What is setw manipulator in c++?
What is the use of typedef?
Who discovered c++?
How can I disable the "echo" feature?
What are virtual functions in c++?
What is the standard template library (stl)?
What is a tree in c++?
Write a program to show polymorphism in C++?
What are features of c++?
what does the following statement mean? int (*a)[4]
Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.
What is class definition in c++ ?