B
Barry Schwarz
# how much memory is allocated for following structure
None. Structures only exist in the compiler; in the code
you have blocks of allocated memory and offsets into them.
A variable of type T needs no more than sizeof(T) char sized
units allocated on appropriate memory boundary.
# struct bharath
# {
# int b;
# char c;
# float d;
# }
A variable of type (struct bharath) will be allocated at
least sizeof(struct bharath) bytes. How a compiler allocates
Would you care to give an example of when it will be allocated more
than sizeof(srtuct bharath) bytes?
the space is really up to the compiler. If you need to know
there are field offset macros to find otu where each field
begins in the variable's allocated space.
Remove del for email