There is no question of bigger or smaller in auto casting. It is only a question of which data gets casted because of association. If a char and an int are associated (because of assignment or comparison or arithmetic operation, etc.) then the char is cast as an int since int is treated as the higher data type. If you try
Sizeof(int) > -1
it will be treated as FALSE !! since sizeof operator produces an unsigned number and unsigned int is treated as higher type than int. Hence the compiler will cast the -1 as unsigned int which results in all binary 1’s OR the biggest unsigned integer.
Please login first to submit.