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 / 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


Please Help Members By Posting Answers For Below Questions

Which is better between malloc and calloc?

1211


What are the rules for identifiers in c?

1074


Write a program to check prime number in c programming?

1104


explain what is an endless loop?

1105


What is hungarian notation? Is it worthwhile?

1232


Tell me with an example the self-referential structure?

1039


What is a void * in c?

1083


How do you define structure?

1051


What are the advantages of the functions?

1165


What is the difference between variable declaration and variable definition in c?

1065


How can I write a function that takes a format string and a variable number of arguments?

1064


What are the different types of control structures in programming?

1139


find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2

1996


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...

1943


What is the ANSI C Standard?

1286