Raúl Gutiérrez Segalés writes:
Hi,
I am trying to do a NOT operation but it doesnt seem to work well:
unsigned int i=8;
printf("%d \n", ~i);
This is suppose to print 247 but I get -9
Any ideas of what am I doing wrong ?
Try using
printf("%hhu \n", ~i);