what is the use of bitfields & where do we use them?
Answers were Sorted based on User's Feedback
Answer / naveen shukla
Bit field is an idiom used in the computer programming
language to store a value as a short series of bits .
It is most commanly used when we know the fix width of int
type variable to be used .
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / 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 |
Can we access array using pointer in c language?
Is a house a shell structure?
What is array of structure in c programming?
What are the disadvantages of c language?
What is include directive in c?
count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array
Differentiate fundamental data types and derived data types in C.
Is it acceptable to declare/define a variable in a c header?
Write the program for displaying the ten most frequent words in a file such that your program should be efficient in all complexity measures.
WHAT IS INT?
What is the difference between printf and scanf in c?
I have a function which accepts, and is supposed to initialize,a pointer, but the pointer in the caller remains unchanged.