[Solved] Format specifier behavior in C [closed]
[ad_1] In first example you are reading it as ’20’ and ‘3’ -> So not equal. In second exmple you are reading it as ’20’ and ‘ 3’-> note space. Its not 2 vs 3. It is 20 vs 3. %d will read whole string. You may want to check with %1d Return from strcmp … Read more