Struct(s)
{
int a;
long b;
}
Union (u)
{int a;
long b;
}
Print sizeof(s)and sizeof(u) if sizeof(int)=4 and
sizeof(long)=4
Answer Posted / vikraman85
Size fo strucure wil be the total bytes of the datatypes
inside it..
so,4+4=8;
For unions the size wi be the size of the datatype whose
memory is high,.
so,its 4,.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
what is the difference between 123 and 0123 in c?
What is 2 d array in c?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
What is the main difference between calloc () and malloc ()?
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
What is a double c?
Why is it usually a bad idea to use gets()? Suggest a workaround.
In which header file is the null macro defined?
What are local variables c?
a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none
What's the right way to use errno?
What is a buffer in c?
Why static is used in c?
Difference between pass by reference and pass by value?
Difference between strcpy() and memcpy() function?