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 a empty class?

Answer Posted / ganesh

when ever an datamember is not the part of the class then default value for object size is 1 byte.
but if int a;
char c;
then it will consume 3 bytes .........

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When do we run a shell in the unix system?

1022


If horse and bird inherit virtual public from animal, do their constructors initialize the animal constructor? If pegasus inherits from both horse and bird, how does it initialize animal’s constructor?

1150


Define upcasting.

988


Can member data be public?

995


What is cout flush?

960


How can you quickly find the number of elements stored in a static array?

1056


Describe new operator?

1096


What is a stack? How it can be implemented?

1128


How much do coding jobs pay?

967


What are c++ manipulators?

1007


What is a breakpoint?

960


What do you understand by zombie objects in c++?

1042


How can a struct in c++ differs from a struct in c?

986


Write a C++ Program to check whether a number is prime number or not?

1066


Array base access faster or pointer base access is faster?

2242