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
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
swap 2 numbers without using third variable?
What are the 5 organizational structures?
Can you tell me how to check whether a linked list is circular?
What are the types of pointers?
Why is c called c not d or e?
Disadvantages of C language.
Do you know the difference between malloc() and calloc() function?
int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above
Write a program which returns the first non repetitive character in the string?
Are the variables argc and argv are always local to main?
What is malloc and calloc?
Is fortran faster than c?
how could explain about job profile
In C, What is the #line used for?