格式说明为“长长” [英] Format specifier for 'long long'

查看:73
本文介绍了格式说明为“长长”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我宣布了64位计数器作为一个变量:

I declare a variable for a 64 bit counter as :

long long call_count;

什么是我应该在打印语句中使用的格式说明?

What is the format specifier that I should use in print statements?

我试过了,%L,%LD,LL%。无似乎是正确的。

I tried, %l, %ld, %ll. None seems to be correct.

我用迪亚布C编译器编译我的应用程序code对pSOS的操作系统上运行。

I use Diab C compiler for compiling my application code to run on pSOS operating system.

推荐答案

据C99,它应该是%LLD(见例如,的here )。如果迪亚布C不C99,那么你不得不看的编译器的文档,我似乎不能用一个快速谷歌搜索在网上找到。

According to C99, it should be "%lld" (see, for example,here). If Diab C isn't C99, then you'd have to look at the compiler docs, which I can't seem to find online with a quick Googling.

这篇关于格式说明为“长长”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆