Wednesday, March 16, 2011

Printing __int64 (long long) datatype in c for windows (Microsoft)

Wandering how to print __int64 data type ? Whereas the other compiler nicely support %lld, Microsoft Visual Studio has a unique way. It usage %I64d for it.

Here code goes;


int main()
{
__int64 a = 1234567890123456789;
printf("%I64d", a);


return 0;
}

1 comment:

Tapesh Maheshwari said...

Please note that it is capital 'I' (after H in alphabetic order)

example %I64d", here 'I' is capital