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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain setjmp()?

649


what are enumerations in C

716


can we change the default calling convention in c if yes than how.........?

2024


what is the role you expect in software industry?

1645


What do you mean by recursion in c?

616






What are global variables and explain how do you declare them?

565


What is the meaning of c in c language?

589


Explain what are multibyte characters?

617


What are the keywords in c?

637


Where are c variables stored in memory?

590


What is the difference between NULL and NUL?

721


Combinations of fibanocci prime series

1105


Which is best linux os?

552


Differentiate between ordinary variable and pointer in c.

611


What is string function in c?

529