What is the argument for printf that formats a long?

前端 未结 7 2085
醉酒成梦
醉酒成梦 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:40

    Put an l (lowercased letter L) directly before the specifier.

    unsigned long n;
    long m;
    
    printf("%lu %ld", n, m);
    
    0 讨论(0)
提交回复
热议问题