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

Why #include is used?

1119


Out of fgets() and gets() which function is safe to use and why?

1240


Do you know what is overriding?

1298


What are the sizes and ranges of the basic c++ data types?

1101


Can we get the value of ios format flags?

1186


What do you mean by vtable and vptr in c++?

1103


What do you mean by translation unit in c++?

1434


What is the auto keyword good for in c++?

1262


What is diamond problem in c++?

1060


What are the stages in the development cycle?

1110


What is a driver program?

1157


Is c++ map a hash table?

1082


What is an undefined behavior and sequence points

1058


Explain the purpose of the keyword volatile.

1243


When do you call copy constructors?

1197