prev up next   top/contents search

comp.lang.c FAQ list · Question 12.7

Q: Why doesn't

long int n = 123456;
printf("%d\n", n);

A: Whenever you print long ints you must use the l (lower case letter ``ell'') modifier in the printf format (e.g. %ld). printf can't know the types of the arguments which you've passed to it, so you must let it know by using the correct format specifiers.

prev up next   contents search
about this FAQ list   about eskimo   search   feedback   copyright

Hosted by Eskimo North