Bit manuplation- get and set bits

cout<<5&4;
int x = 5;
int mask = 1<<2;
cout<<x&mask;
give error

Check it.
You should enclose the expression within parenthesis.