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 |
do u print this format '(((())))'. This brackets is based on user input like 4 or 5 or 6,without using any loop's?
char p="data"; printf(p);
please tell me the logic for this C program : INPUT (string):ABCD OUTPUT :BCDA CDAB DABC
Can main () be called recursively?
Write a program to identify if a given binary tree is balanced or not.
Explain c preprocessor?
Which is the best sort method for library management?
what is the role you expect in software industry?
What is volatile variable in c with example?
Is main() function predfined or userdefined?
WHAT IS INT?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it