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


struct abc
{

unsigned int a;
char b;
float r;
};
struct xyz
{
int u;
struct abc tt;
}ww;
ww = (struct xyz*)malloc(sizeof(struct xyz));
will the memory be allocated for the inner structure also?



struct abc { unsigned int a; char b; float r; }; struct xyz { int u; struct abc tt; }ww;..

Answer / sadanand

Yes. when sizeof(xyz) is done. it will compute size of
struct abc + size of int

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More C Interview Questions

Write a programe print the sum of series 0,1,2,.....10

7 Answers  


a simple program in c language

5 Answers   IBM,


Write a program on swapping (100, 50)

0 Answers   BPL,


the expression a=30*1000+2768; evalutes to a) 32768 b) -32768 c) 113040 d) 0

1 Answers  


What are the different types of control structures in programming?

0 Answers  


what will be printed by this printf? printf("%c",printf("hi")["sharkselva"])); }

3 Answers   HCL,


5. distance conversion: Convert a distance from miles to kilometers .there are 5280 feets per mile,12 inches per foot .2.54 centimeters per inch and 100000centimeters per kilometer

4 Answers  


what is the maximum no. of bytes calloc can allocate

4 Answers   Mphasis,


What are loops in c?

0 Answers  


Differentiate between new and malloc(), delete and free() ?

0 Answers   iNautix,


What is the use of getch ()?

0 Answers  


What is #line in c?

0 Answers  


Categories