printf format for unsigned __int64 on Windows

Virus721 picture Virus721 · Aug 7, 2013 · Viewed 69.8k times · Source

I need to print a ULONGLONG value (unsigned __int64). What format should i use in printf ? I found %llu in another question but they say it is for linux only.

Thanks for your help.

Answer

Eric Postpischil picture Eric Postpischil · Aug 7, 2013

Using Google to search for “Visual Studio printf unsigned __int64” produces this page as the first result, which says you can use the prefix I64, so the format specifier would be %I64u.