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
What is #line?
What is the best way to store flag values in a program?
Write a code to generate divisors of an integer?
What header files do I need in order to define the standard library functions I use?
Why n++ execute faster than n+1 ?
What is hashing in c?
Can true be a variable name in c?
What is extern storage class in c?
What is the ANSI C Standard?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
Tell us the use of fflush() function in c language?
Explain what is the heap?
What are the features of c languages?
What are predefined functions in c?
What is pointer in c?