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 object

Answer Posted / orvaishnavi

The size of an empty class is 1.
Reason - An object of a class should have unique address.
In order for the object to get unique address, the compiler
inserts a dummy type of size 1(least positive value) into
the empty class so the sizeof the class is returned as 1.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does the copy constructor differ from the assignment operator (=)?

1192


Do vectors start at 0 c++?

1076


What is c++ array?

1192


Explain about vectors in c ++?

1080


A mXn matrix is given and rows and column are sorted as shown below.Write a function that search a desired entered no in the matrix .with minimum complexity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

3711


Which coding certification is best?

1077


What is flag in computer?

1117


What is ostream in c++?

1064


Write a program which uses Command Line Arguments

1232


What is vector pair in c++?

1264


What is the full form of c++?

1430


Explain the difference between abstract class and interface in c++?

1037


Write about the role of c++ in the tradeoff of safety vs. Usability?

1128


Explain the use of vtable.

1132


What is a forward referencing and when should it be used?

1210