Put an l
(lowercased letter L) directly before the specifier.
unsigned long n;
long m;
printf("%lu %ld", n, m);
More Related Contents:
- How to printf “unsigned long” in C?
- What is the conversion specifier for printf that formats a long?
- How do you type something on the same line of text in C [closed]
- Is there a printf converter to print in binary format?
- Printf width specifier to maintain precision of floating-point value
- How can one print a size_t variable portably using the printf family?
- Printing hexadecimal characters in C
- The “backspace” escape character ‘\b’: unexpected behavior?
- printf and long double
- Code for printf function in C [duplicate]
- What’s the correct way to use printf to print a clock_t?
- What is the use of the %n format specifier in C?
- Getting a weird percent sign in printf output in terminal with C
- What is the purpose of the h and hh modifiers for printf?
- Why is #include not required to use printf()?
- How to printf a size_t without warning in mingw-w64 gcc 7.1?
- printf not printing on console
- Execution of printf() and Segmentation Fault
- Behaviour of printf when printing a %d without supplying variable name
- Why is printf with a single argument (without conversion specifiers) deprecated?
- Determining sprintf buffer size – what’s the standard?
- warning: left shift count >= width of type
- Unexpected output of printf
- Explain the order of evaluation in printf [duplicate]
- Incompatible pointer types passing in _Generic macro
- What is the correct printf specifier for printing pid_t
- How to print an unsigned char in C?
- ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Wformat=] [duplicate]
- Why does this code print two times? [duplicate]
- How do I align a number like this in C?