- printf - C++ Users
Writes the C string pointed by format to the standard output (stdout) If format includes format specifiers (subsequences beginning with %), the additional arguments following format are formatted and inserted in the resulting string replacing their respective specifiers Parameters format C string that contains the text to be written to stdout It can optionally contain embedded format
- std::printf, std::fprintf, std::sprintf, std::snprintf - cppreference. com
std::printf("\tright-justified variable width: '%*c'\n", 5, 'x'); int r = std::printf("\tleft-justified variable width : '%*c'\n", -5, 'x'); std::printf("(the last printf printed %d characters)\n", r);
- printf (3) - Linux manual page - man7. org
Code such as printf (foo); often indicates a bug, since foo may contain a % character If foo comes from untrusted user input, it may contain %n, causing the printf () call to write to memory and creating a security hole
|