Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Can a variable be both const and volatile?

1118


What are header files? What are their uses?

1190


Explain how do you declare an array that will hold more than 64kb of data?

1439


what is recursion in C

1056


Why is extern used in c?

1085


Why is sizeof () an operator and not a function?

1013


Differentiate Source Codes from Object Codes

1544


Can an array be an Ivalue?

1079


How does normalization of huge pointer works?

1155


Write a program to check palindrome number in c programming?

1002


Explain how do you convert strings to numbers in c?

1067


How can you convert integers to binary or hexadecimal?

1015


Why c is a procedural language?

1043


What is the benefit of using #define to declare a constant?

1077


Write a program to swap two numbers without using the third variable?

1050