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 are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above
how do you execute a c program in unix.
Explain what does it mean when a pointer is used in an if statement?
Explain how can you be sure that a program follows the ansi c standard?
Is stack a keyword in c?
How can I read in an object file and jump to locations in it?
How to draw the flowchart for structure programs?
How to write c functions that modify head pointer of a linked list?
Is null a keyword in c?
What is the meaning of ?
What are the 4 types of unions?
What is the difference between malloc() and calloc()?
Explain what is page thrashing?
What is methods in c?
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?