If i'm using m instead of ~m then the code gives me the expected hexadecimal value of 32 but here it's giving ffffffdf as output.
EDIT I know how bitwise ~ NOT operator works. But i'm not understanding this.Could somebody explain this...??
#include<stdio.h>
int main()
{
unsigned int m = 32;
printf("%x\n", ~m); //ffffffdf is printed as output
return 0;
}
Aucun commentaire:
Enregistrer un commentaire