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

what is the use of bitfields & where do we use them?

Answer Posted / rams

Bit fields are used to restrict the size of a structure member. we can reduce the size of a structure member as a result no wastage of bits. suppose if i want to store date generally it is between 1 to 31 we can store it in 5 bits only.

bit fields can be used only with in structure.

ex:struct st
{
char date:5;
};

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

1167


How can I run c program?

1234


What is the use of void pointer and null pointer in c language?

1169


What is huge pointer in c?

1143


Explain what does the function toupper() do?

1136


Are enumerations really portable?

1079


What Is The Difference Between Null And Void Pointer?

1336


What is else if ladder?

1076


How will you print TATA alone from TATA POWER using string copy and concate commands in C?

1426


What is the difference between malloc calloc and realloc in c?

1191


Suggesting that there can be 62 seconds in a minute?

1105


What is the difference between c and python?

1235


What are structure types in C?

1156


Is null a keyword in c?

1254


the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?

1045