A simple one yet complex 4 me

#include<stdio.h>
void main()
{
printf("Value : %d",10^9);
}

Result : 3

Can anybody please help me with this..i don't get how the result can be 3...
closed account (o1vk4iN6)
the ^ doesn't mean to the power, it is a binary "exclusive or" (xor) operator in C++.

http://www.cplusplus.com/doc/tutorial/operators/
Last edited on
Hey thanks..got it now..a very simple one!
Topic archived. No new replies allowed.