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
Is file a keyword in c?
What is gets() function?
How are portions of a program disabled in demo versions?
How do we open a binary file in Read/Write mode in C?
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
What is 1d array in c?
How do I get an accurate error status return from system on ms-dos?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
What is the deal on sprintf_s return value?
How to declare a variable?
What is array of structure in c?
What is the concatenation operator?
What is this pointer in c plus plus?
Is c language still used?
How do you search data in a data file using random access method?