+ 6
It's a warning not an error.
And I think the compiler made it quite clear already.
You are trying to convert long unsigned Int ( returned by sizeof() operator ) to type Int ( By using "%d" format specifier )
Which might lead to undesired result in some cases.
+ 1
Lockie again, it's a warning. The program will still print the answer in you use "%d" but then the result will be printed as "int" data type.
This will not be a problem till the time the sizeof() is returning values that can fit in "int", but if it returns a size bigger than that ( which is can as "long unsigned int" have greater capacity than "int" ) then the program will definately give undesired result.



