I don't get what your trying to do--looks like basic assignment, in which case int z=x|y will work, as long as x and y are initialized--not initializing them will give you odd values sometimes.
Thanks, Tyler Littlefield Web: tysdomain.com email: [email protected] My programs don't have bugs, they're called randomly added features. ----- Original Message ----- From: Satya Prasad To: [email protected] Sent: Saturday, March 21, 2009 7:42 AM Subject: [c-prog] Bit Operator Is it safe to refer same variables in LHS and RHS while using Bitwise operators. Like: int x = 0 ; int y = 0; x = x | y; OR int z = x | y ; x = z; is more safe and why? Regards, Prakash [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]
