What is the argument for printf that formats a long?

前端 未结 7 2198
醉酒成梦
醉酒成梦 2020-11-28 17:50

The printf function takes an argument type, such as %d or %i for a signed int. However, I don\'t see anything for a

7条回答
  •  無奈伤痛
    2020-11-28 18:34

    It depends, if you are referring to unsigned long the formatting character is "%lu". If you're referring to signed long the formatting character is "%ld".

提交回复
热议问题