What would be the meaning of these format specifiers?
%hd %hhd %ld %lld
What would be the meaning of these format specifiers?
%hd %hhd %ld %lld
%hd is used for short integer
or unsigned short integer
%hhd is for short short integer
or unsigned short short integer
%ld is for long integer
or unsigned long integer
%lld is for long long integer
or unsigned long long integer
Simple as that.
Here h
, hh
, l
, ll
are just length modifiers in %d
Source: http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/Strings/Articles/formatSpecifiers.html
Just look into the Documentation from Apple provided here: http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/Strings/Articles/formatSpecifiers.html
I think this document from IBM is a bit better.So:
%hd int x (short)x 10 1
%ld long x (long)x 10 1