what is the use of bitfields & where do we use them?

Answers were Sorted based on User's Feedback



what is the use of bitfields & where do we use them?..

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

what is the use of bitfields & where do we use them?..

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

Post New Answer

More C Interview Questions

what are two categories of clint-server application development ?

1 Answers  


What is structure data type in c?

0 Answers  


Program to find the value of e raised to power x using while loop

5 Answers   IBM, N Tech,


How can you find out how much memory is available?

0 Answers  


What is meant by keywords in c?

0 Answers  






Program to find the absolute value of given integer using Conditional Operators

6 Answers   N Tech,


What is the advantage of c?

0 Answers  


Find occurence of a character in a sting.

3 Answers   TCS,


What are the general description for loop statement and available loop types in c?

0 Answers  


write a reverse string to print a stars.(with out using logic) ***** **** *** ** *

2 Answers  


explain what is an endless loop?

0 Answers  


who is the father of C Language?

20 Answers   CTS, UST,


Categories