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...

why the size of an empty class is 1

Answer Posted / hitesh sojitra

When you calculate the size of a empty class that time you can c it takes 1 byte.which is the size of a char which a compiler takes for storing the address of a empty class.

The size of an empty class would depend on what is the range specified for the compiler for char. It takes that much space to store the address of a class.

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a program which uses Command Line Arguments

1182


What is the prototype of printf function?

1185


Is main a class in c++?

1005


How do you write a function that can reverse a linked-list?

1110


What is different in C++, compare with unix?

1100


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

1077


Difference between pointer to constant and constant pointer to a constant. Give example.

1118


What is a loop? What are different types of loops in c++?

1129


What does the nocreate and noreplace flag ensure when they are used for opening a file?

1116


What is polymorphism in c++? Explain with an example?

1034


How many keywords are used in c++?

1015


What are punctuators in c++?

1157


What are the extraction and insertion operators in c++?

1002


What is the this pointer?

1116


Describe the advantage of an external iterator.

1042