Difference between scanf() and strtol() / strtod() in parsing numbers

后端 未结 8 1602
陌清茗
陌清茗 2020-12-05 20:28

Note: I completely reworked the question to more properly reflect what I am setting the bounty for. Please excuse any inconsistencies with already-given ans

8条回答
  •  暖寄归人
    2020-12-05 20:42

    I am not sure I understand the question, but for one thing scanf() is supposed to handle EOF. scanf() and strtol() are different kinds of beasts. Maybe you should compare strtol() and sscanf() instead?

提交回复
热议问题