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 / jack
I assume above code to be correctly written as below:
struct s
{
int a;
long b;
}
Union u
{int a;
long b;
}
sizeof(s)= 8
sizeof(u) = 4
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
Can a variable be both const and volatile?
What are header files? What are their uses?
Explain how do you declare an array that will hold more than 64kb of data?
what is recursion in C
Why is extern used in c?
Why is sizeof () an operator and not a function?
Differentiate Source Codes from Object Codes
Can an array be an Ivalue?
How does normalization of huge pointer works?
Write a program to check palindrome number in c programming?
Explain how do you convert strings to numbers in c?
How can you convert integers to binary or hexadecimal?
Why c is a procedural language?
What is the benefit of using #define to declare a constant?
Write a program to swap two numbers without using the third variable?