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
Differentiate Source Codes from Object Codes
What do you understand by normalization of pointers?
What is the scope of an external variable in c?
What are qualifiers in c?
Distinguish between actual and formal arguments.
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
What is a macro, and explain how do you use it?
What is variable declaration and definition in c?
how do you programme Carrier Sense Multiple Access
What is the default value of local and global variables in c?
What is an auto variable in c?
What is function and its example?
How do shell structures work?
Explain the use of function toupper() with and example code?
how can f be used for both float and double arguments in printf? Are not they different types?