Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C Moderated > Re: Pointer to ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 5 Topic 1029 of 1133
Post > Topic >>

Re: Pointer to an individual bit?

by Minimiscience <minimiscience+usenet@[EMAIL PROTECTED] > Jan 14, 2008 at 12:50 PM

sigmacunfu <sigmacunfu@[EMAIL PROTECTED]
> writes:

>1. I want to know, if it's possible to have a pointer that is pointing
>to an individual bit, say, of an "int"?

No.

>2. Suppose that I have declared a "unsigned int", using bitwise
>operations, I have set the higher 16 bits to 1, is it possible now
>that without using bitwise operations, I could copy a 16-bit "unsigned
>short" into its lower 16 bits?

You could just add the short to the int (assuming, of course, that the int
is
at least 32 bits long).
-- 
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
 -- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line.  Sorry.
 




 5 Posts in Topic:
Pointer to an individual bit?
sigmacunfu <sigmacunfu  2008-01-12 16:45:54 
Re: Pointer to an individual bit?
=?ISO-8859-1?Q?Hans-Bernh  2008-01-14 12:49:50 
Re: Pointer to an individual bit?
smartwhizguy_t@[EMAIL PRO  2008-02-17 12:04:47 
Re: Pointer to an individual bit?
Jack Klein <jackklein@  2008-01-14 12:49:28 
Re: Pointer to an individual bit?
Minimiscience <minimis  2008-01-14 12:50:29 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 1:57:47 CDT 2008.