10 in binary is 1010, but this gives me output -6, shouldn't it be -2?
struct foo s;
the forth digit of 10 in binary is 1 that means the result will be <0, the remaining part of this is 010 which is 2, so why does it give me -6 instead of -2?
but if we have
int y=++x; // y=1 and x=1
int y=x++; //y=0 and x=1
why is x here 1??? I mean 0!=1 right? I can't get it
also here x is 0?? Why?
thanks in advance