sushant wrote:
is it possible to scan a value to a member of a stucture which is of
bit field type??? if yes then how if no then why....
If by "scan the value" you mean "read it using one of
the scanf() family of functions," the answer is no: it is
not possible.
"Why" is a question with a few layers of answers, the
topmost being that bit fields are not addressable; it is
not possible to form a pointer to a bit field. To the
next layer's "Why," the answer is that `char' is the "atom"
in C's addressing model; since a bit field may be smaller
than a `char' or may straddle `char' boundaries, C's model
of addresses cannot accommodate it. Still further levels of
"Why" stray into the realm of computer architecture design,
which I'm not qualified to discuss -- and besides, it's a
topic for some other newsgroup.
--
Eric Sosman
es*****@acm-dot-org.invalid