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


Please Help Members By Posting Answers For Below Questions

What are reserved words?

654


What is indirection? How many levels of pointers can you have?

659


Write a code to generate a series where the next element is the sum of last k terms.

732


any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above

645


What is typedf?

668






Can you please explain the difference between exit() and _exit() function?

592


What is string function in c?

538


What is exit() function?

559


a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor

637


What does stand for?

596


List some basic data types in c?

559


Why isnt there a numbered, multi-level break statement to break out

587


Differentiate between a structure and a union.

762


write a c program to print the next of a particular no without using the arithmetic operator or looping statements?

3187


Explain how do you search data in a data file using random access method?

696