In the C Primer Plus example, the author used the %ul format specifier (for both scanf and printf) for unsigned long . When I try to generalize the problem, it seems that %ul doing something wrong on my computer. But using %lu solved the problem.
Actually, instead of focusing on the problem and the line of codes, I want to know about the difference between %ul and %lu . Maybe I can understand what is wrong.
The search does not give me anything useful (except that "they are different").
Any explanation or link / link is appreciated.
source share