as both char and short are of 16-bits why implicit conversion is not done here?
I know that char variables are unsigned and short variables are signed.
Can any one explain me the problem clearly?
While both char and short are 16 bits long, a short can be negative while a char cannot be negative,
If a == -5, what should "c=a" do?
As Animesh points out, if "a" is a final nonnegative number, there is no risk of "a" not fitting into "c".