How to printf “unsigned long” in C?

后端 未结 7 598
有刺的猬
有刺的猬 2020-11-28 01:08

I can never understand how to print unsigned long datatype in C.

Suppose unsigned_foo is an unsigned long, then I try:

7条回答
  •  悲哀的现实
    2020-11-28 01:17

    The correct specifier for unsigned long is %lu.

    If you are not getting the exact value you are expecting then there may be some problems in your code.

    Please copy your code here. Then maybe someone can tell you better what the problem is.

提交回复
热议问题