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

Can a constructor be private?

1068


What is the use of endl?

984


What is singleton class in c++?

1041


What is pointer to array in c++?

1158


Evaulate: 22%5 a) 2 b) 4 c) 0

1087


What is #include cstdlib in c++?

1179


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

1184


Is empty stack c++?

993


Is java made in c++?

1060


What is using namespace std in cpp?

1156


What does 7/9*9 equal ? a) 1 b) 0.08642 c) 0

953


What is the difference between strcpy() and strncpy()?

1142


why is c++ called oops? Explain

1044


Can user-defined object be declared as static data member of another class?

1021


Differentiate between a copy constructor and an overloaded assignment operator.

1076