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

How much is size of struct having 1 char & 1 integer?

Answer Posted / vadivelt

The size of the stucture depends on the following factors.

1.Depends on the size of the datatype, allocated by compiler
2.Depends on the allignment of the variables in the
structure.

If variables of different datatypes are misalligned, then
badding bytes will be added by the compiler to falitate to
speed up the memory access by the processor.So that the size
of the structure will increase.

Is This Answer Correct ?    11 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are there interfaces in c++?

1032


Explain the term memory alignment?

1251


What is iostream in c++ used for?

1044


What is set in c++?

1142


Is c++ map a hash table?

1041


What is the this pointer?

1128


What are different types of loops in c++?

1138


What are multiple inheritances (virtual inheritance)?

1067


What is a pointer with example?

1273


Who made c++?

1097


Explain the register storage classes in c++.

1194


What is object in c++ wikipedia?

1014


When do we use copy constructors?

1088


When does a 'this' pointer get created?

1112


How did c++ get its name?

1043