The printf
function takes an argument type, such as %d
or %i
for a signed int
. However, I don't see anything for a long
value.
C – Conversion Specifier for printf That Formats a Long
c++long-integerprintf
c++long-integerprintf
The printf
function takes an argument type, such as %d
or %i
for a signed int
. However, I don't see anything for a long
value.
Best Answer
Put an
l
(lowercased letter L) directly before the specifier.