int main()
{
//Beauty is in relaxed hard work.
//SSGCA :)
//Keep doing your thing, complexity would turn into simplicity! :)
unsigned short int a=0xffff;
~a;
printf("%x",a);
return 0;
}
Why does this program output 'ffff' and not 0000?
yeah, but why doesn't 'a' get complemented on application of '~'?
[~a;] is not doing anything over the variable a. You are using a copy of variable a to do something (~) without assign this result to anybody.
oh, yeah Thanks. :)