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
Which is better between malloc and calloc?
What are the rules for identifiers in c?
Write a program to check prime number in c programming?
explain what is an endless loop?
What is hungarian notation? Is it worthwhile?
Tell me with an example the self-referential structure?
What is a void * in c?
How do you define structure?
What are the advantages of the functions?
What is the difference between variable declaration and variable definition in c?
How can I write a function that takes a format string and a variable number of arguments?
What are the different types of control structures in programming?
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
What is the ANSI C Standard?