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 / raja

you will have to study through structure padding concepts.
It depends on the compiler.
struct
{
char a;
int b;
}
The above struct size will be 8 in standard compilers (Turbo
C is a non-standard compiler). bcoz between a and b there
will be 3 pad bytes placed..

Refer this link you will know everything about structure
padding..All d best :)
http://www.allinterview.com/showanswers/62991.html

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is null and void pointer?

1008


What is c++ namespace?

1157


What is a vector c++?

1109


what are function pointers?

988


What do you mean by delegate? Can a user retain delegates?

889


What is an incomplete type in c++?

1220


What is set in c++?

1080


Is c++ proprietary?

1016


What is atoi?

930


Explain the purpose of the keyword volatile.

1109


By using c++ with an example describe linked list?

987


What is the use of main function in c++?

935


What is #include iostream?

1199


Should the member functions which are made public in the base class be hidden?

973


How do we implement inheritance in c++?

1080