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

what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

1098


how do you execute a c program in unix.

1091


Explain what does it mean when a pointer is used in an if statement?

1028


Explain how can you be sure that a program follows the ansi c standard?

1424


Is stack a keyword in c?

1052


How can I read in an object file and jump to locations in it?

1001


How to draw the flowchart for structure programs?

9290


How to write c functions that modify head pointer of a linked list?

955


Is null a keyword in c?

1158


What is the meaning of ?

1008


What are the 4 types of unions?

1003


What is the difference between malloc() and calloc()?

1740


Explain what is page thrashing?

1064


What is methods in c?

1042


Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?

976