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
What is a header file?
Which function in C can be used to append a string to another string?
What is the explanation for prototype function in c?
What is a string?
What is a void pointer? When is a void pointer used?
What does %c mean in c?
How is pointer initialized in c?
What does c mean before a date?
Explain what is the benefit of using enum to declare a constant?
find the sum of two matrices and WAP for it.
Why clrscr is used after variable declaration?
Tell me what is null pointer in c?
Is Exception handling possible in c language?
Why is sprintf unsafe?
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)