Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are bit fields? What is their use?

Answer Posted / vadivel t

Bit fields main intention is to reduce the memory
consumption.

Syntax:
------

struct
{
int a:1;
/*whatever may be the size of the int(compiler dependent),
only one bit shall be allocated for variable 'a'*/
}BITFIELDS;

Restictions:
------------
1. Accessing or printing address of bitfield variable is
not possible.
2.Array of bit fields, not possible.
3.A function cannot return a bit field variable.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Should I use symbolic names like true and false for boolean constants, or plain 1 and 0?

1067


Where register variables are stored in c?

970


Explain that why C is procedural?

1145


What is the full form of getch?

1277


How many bytes is a struct in c?

1166


What is the concatenation operator?

1150


Explain what is the difference between the expression '++a' and 'a++'?

1214


How can I implement sets or arrays of bits?

1047


When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?

1273


What is meant by realloc()?

1152


cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration

1108


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

2302


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

2255


What is || operator and how does it function in a program?

1092


What is difference between far and near pointers?

1042