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
cavium networks written test pattern ..
Write a program to print fibonacci series using recursion?
What is printf () in c?
How can I remove the leading spaces from a string?
What is c standard library?
Mention four important string handling functions in c languages .
What is the difference between char array and char pointer?
How main function is called in c?
What are header files and what are its uses in C programming?
Explain what math functions are available for integers? For floating point?
What is the difference between a string and an array?
which is an algorithm for sorting in a growing Lexicographic order
show how link list can be used to repersent the following polynomial i) 5x+2
What’s the special use of UNIONS?
Explain what is wrong with this program statement?