Anupreet is correct, This is my explanation:
In the following code, compiler throws at line#2. Why is that? you're trying to fit an integer into a char, and that's not valid unless you cast it. By casting you're telling the compiler that you are aware of the risk of performing this operation.
Shouldn't it complain about line#1 first No. You have declared a local variable which is not initialized. The compiler will only complain when you start using it (of course, when you're doing something different than initializing)
If you fix line#2 by using a cast operator, it then complains about line #1 that 'i' is uninitialized. Yup, because of my last explanation