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
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
How can I run c program?
What is the use of void pointer and null pointer in c language?
What is huge pointer in c?
Explain what does the function toupper() do?
Are enumerations really portable?
What Is The Difference Between Null And Void Pointer?
What is else if ladder?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
What is the difference between malloc calloc and realloc in c?
Suggesting that there can be 62 seconds in a minute?
What is the difference between c and python?
What are structure types in C?
Is null a keyword in c?
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?