Mainly in case of loop. For example: unsigned char i = 0;
/* Infinite Loop due to unsigned nature of i */ for (i = 10 ; i < 0; i --) {
}
Better to use signed char i = 0 to make correct execution of loop.
A char can not be a +ve or -ve. last bit is signed bit in accumulator.but not useful for CHAR Whats the purpose? of doing it.
#include <stdio.h> int main() { char val=250; int ans; ans= val+ !val + ~val + ++val; printf("%d",ans); return 0; }