I have the following code:
z=x-~y-1; printf(\"%d\",z); z=(x^y)+2(x&y); printf(\"%d\",z); z=(x|y)+(x&y); printf(\"%d\",z); z=2(x|y)-(x
Change
z=(x^y)+2(x&y);
to
z=(x^y)+2*(x&y);
and
z=2(x|y)-(x^y);
z=2*(x|y)-(x^y);
You need the multiplication operator if multiplication is what you intended.