Alex Rivera | Logout

Format specifier for 'long long'

Asked 2009-01-20T17:52:17.630
45

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?

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

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

c
Edit
Report

1 Answer

69

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.

answered 2009-01-20T18:08:17.300

Your Answer