北城已荒凉 2008-09-01 22:45 采纳率: 100%
浏览 218
已采纳

对于格式为 long 的 printf 有什么论点?

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

转载于:https://stackoverflow.com/questions/38561/what-is-the-argument-for-printf-that-formats-a-long

  • 写回答

7条回答 默认 最新

  • 撒拉嘿哟木头 2008-09-01 22:50
    关注

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

    unsigned long n;
    long m;
    
    printf("%lu %ld", n, m);
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(6条)

报告相同问题?