+ 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.
11th Mar 2021, 3:06 PM
Arsenic
Arsenic - avatar
+ 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.
13th Mar 2021, 12:25 AM
Arsenic
Arsenic - avatar