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

Explain Memory Allocation in C/C++ ?

1117


What is the main purpose of overloading operators?

1211


What is the full form nasa?

1185


What is the header file for setw?

1195


Explain what data encapsulation is in c++?

1158


What are the differences between the function prototype and the function defi-nition?

1159


Write a Program to find the largest of 4 no using macros.

1144


What is algorithm in c++ programming?

1193


Why do we use the using declaration?

1237


Explain the static member function.

1229


write a porgram in c++ that reads an integer and print the biggest digit in the number

2312


Mention the storage classes in c++.

1132


What is meant by a delegate?

1143


What are special characters c++?

1087


Which of the following is evaluated first: a) && b) || c) !

2420