Top "Printf" questions

`printf` is a common function for formatted output.

Printing UTF-8 strings with printf - wide vs. multibyte string literals

In statements like these, where both are entered into the source code with the same encoding (UTF-8) and the locale …

c unicode utf-8 printf multibyte
Why is the format specifier for uint8_t and uint16_t the same (%u)?

I only found pretty unrelated questions due to the tons of results searching for printf(). Why does uint8_t not …

c printf format-specifiers
printf format for unsigned __int64 on Windows

I need to print a ULONGLONG value (unsigned __int64). What format should i use in printf ? I found %llu in …

c++ c windows printf unsigned
How to use C++ std::ostream with printf-like formatting?

I am learning C++. cout is an instance of std::ostream class. How can I print a formatted string with …

c++ formatting printf ostream
Which of sprintf/snprintf is more secure?

I wish to know which of these two options is the more secure one to use: #define MAXLEN 255 char buff[…

c security unix printf secure-coding
Printf a buffer of char with length in C

I have a buffer which I receive through a serial port. When I receive a certain character, I know a …

c buffer printf
Arduino sprintf float not formatting

I have this arduino sketch, char temperature[10]; float temp = 10.55; sprintf(temperature,"%f F", temp); Serial.println(temperature); temperature prints out …

c++ arduino printf
C's printf and fprintf(stdout,) are not printing

This is a bit of an odd one. My code wasn't outputting what I thought it should. I added some …

c file-descriptor printf
What’s the correct way to use printf to print a clock_t?

I'm currently using a explicit cast to unsigned long long and using %llu to print it, but since size_t …

c io printf clock
Correct printf format specifier for size_t: %zu or %Iu?

I want to print out the value of a size_t variable using printf in C++ using Microsoft Visual Studio 2010 (…

c++ c visual-studio-2010 printf format-specifiers