Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is size of Empty Class?

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


Please Help Members By Posting Answers For Below Questions

Difference between class and structure.

1105


What do you mean by translation unit?

1036


What is capacity in vector in c++?

933


What is the use of this pointer in c++?

968


What is lazy initialization in c++?

1050


Is c++ proprietary?

1010


What are friend functions in C++?

1009


What are the two main components of c++?

1057


Show the application of a dynamic array with the help of an example.

1074


Is it possible to pass an object of the same class in place of object reference to the copy constructor?

978


What is meant by entry controlled loop?

1060


What does it mean to declare a member function as static?

1013


What is wrapper class in c++?

1041


Which function cannot be overloaded c++?

1050


What is private public protected in c++?

981